短评 · ·

X 归档 2022-11-12

9 条动态 · 图 3 · 视频 2
@jh3yy00:50原推文
CSS Tip! 🚀

Use custom properties to power parallax effects 😎

Use JavaScript to pass the pointer position to CSS. Let CSS handle the rest, moving things at different rates 💪

card:hover{
rotate: calc(var(--ratio-y) * 50deg);
}

Play with card effects ✨

Demo link below! 👇
CSS 技巧!🚀

用自定义属性驱动视差效果 😎

用 JavaScript 把指针位置传给 CSS,剩下的交给 CSS,让元素以不同的速率移动 💪

card:hover{
rotate: calc(var(--ratio-y) * 50deg);
}

来玩玩卡片效果 ✨

Demo 链接在下方!👇
@jh3yy00:50原推文
Here's that @CodePen link! ⚡️

It's kinda hard to explain everything going on here in one tweet 😅

The magic part is how you can use JS to work out something for you and then let CSS do the rest, you're decoupling them in a way.

Let's go over it 👇

https://codepen.io/jh3y/pen/wvXvERq
这是那个 @CodePen 链接!⚡️

想在一条推文里把这里面的门道全讲清楚还真有点难 😅

神奇之处在于:你可以用 JS 替你算出某些东西,然后让 CSS 完成剩下的工作,从某种意义上这是一种解耦。

我们来过一遍 👇

https://codepen.io/jh3y/pen/wvXvERq
Render maps on GitHub using markdown. 💯

Markdown / Preview
用 Markdown 在 GitHub 上渲染地图。💯

Markdown / 预览
@diegohaz 的配图 1/2 @diegohaz 的配图 2/2
@sebmck03:28原推文
New @rometools Playground coming soon!
全新的 @rometools Playground 即将上线!
@sebmck 的配图 1/1
I found that I need a more powerful CI machine for stc because the default GitHub actions runner dies with OOM even without LTO. I applied for GitHub Actions custom runner beta. It's possible thanks to the people who donated.
我发现 stc 需要一台更强的 CI 机器,因为默认的 GitHub Actions runner 即使不开 LTO 也会因 OOM 挂掉。我申请了 GitHub Actions 自定义 runner 的 beta。多亏了捐赠者们,这才成为可能。
@jh3yy12:34原推文
CSS Tip! 🚀

Use custom properties to power parallax effects 😎

Use JavaScript to pass the pointer position to CSS. Let CSS handle the rest, moving things at different rates 💪

card:hover{
rotate: calc(var(--ratio-y) * 50deg);
}

Play with card effects ✨

Demo link below! 👇
CSS 技巧!🚀

用自定义属性驱动视差效果 😎

用 JavaScript 把指针位置传给 CSS,剩下的交给 CSS,让元素以不同的速率移动 💪

card:hover{
rotate: calc(var(--ratio-y) * 50deg);
}

来玩玩卡片效果 ✨

Demo 链接在下方!👇
@nzb32914:08原推文
@perjerz34 Maybe you can try the another DnD library
https://github.com/ng-dnd/ng-dnd
@perjerz34 也许你可以试试另一个 DnD 库
https://github.com/ng-dnd/ng-dnd