纯 CSS 滚动驱动动画集
Scroll-driven Animations,Bramus Van Damme,2023 年

正在布展…
它是怎么做的
- 第 1 步animation-timeline: scroll() 把动画进度绑定到容器滚动位置。
- 第 2 步animation-timeline: view() 绑定到元素在视口中的可见进度。
- 第 3 步animation-range 指定 entry/exit/cover 等区间。
- 第 4 步不支持的浏览器用 flackr/scroll-timeline polyfill 降级。
复刻配方
一段技术配方,可以直接交给 AI 编程助手,也可以自己照着写。想指定技术栈、位置和性能预算,就把它加入实现方案。
Write ordinary @keyframes for the effect you want (scale, rotateY, clip-path reveal). Attach them with animation-timeline: view() on each item and set animation-range such as 'entry 0% cover 50%' so the motion maps to the item's passage through the viewport. For a header, use animation-timeline: scroll(root) with a fixed range in pixels. Gate everything behind @supports (animation-timeline: view()) and prefers-reduced-motion, leaving a static layout as fallback.
档案
性能开销
视觉强度
实现难度
尺度为策展判断(1 到 5),用于比较和推荐。
核实记录:Site loads (HTTP 200, title 'Scroll-driven Animations'); page links to the flackr/scroll-timeline polyfill (Apache-2.0) and a debugger extension. No repo for the demo site itself found.


