X 归档 2023-09-04
活在这个时代真好。
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
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
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

