短评 · ·

X 归档 2023-09-04

2 条动态 · 图 0 · 视频 2
活在这个时代真好。
@jh3yy19:34原推文
Here's how I'd do this one 🤙

The CSS tip is to use animation-timeline with scroll(nearest) ⚡️ And a custom property for animation-range 💙

.scroll-container { --buffer: 2rem; }
.indicator {
opacity: 0;
animation: reveal both linear;
animation-timeline: scroll(nearest);… https://t.co/n3qM1vG9AU
我会这么做 🤙

CSS 技巧在于用 animation-timeline 搭配 scroll(nearest) ⚡️ 再给 animation-range 用一个自定义属性 💙

.scroll-container { --buffer: 2rem; }
.indicator {
opacity: 0;
animation: reveal both linear;
animation-timeline: scroll(nearest);… https://t.co/n3qM1vG9AU