← Back to miito.dev

Digital Garden

October 21
Garden HubAutomotiveTypeScriptTestingSVGSQLSecurityReactPerformanceNode.jsModdingJavaScriptGame DevDevOpsDesignCSSCommunication
miito.dev
© Brian Dinh (miito.dev)
✕
✕
§ GARDEN · CSS · CLASS OPEN
NODE FILE · ENTRY

Scroll-Driven Animations in Pure CSS

FILED UNDER · CSS
①Read
②Meta

Tie CSS animations to scroll progress with no JavaScript — the animation-timeline property unlocks a new paradigm.

Scroll-linked effects used to require IntersectionObserver hacks or heavy JavaScript libraries. The new animation-timeline CSS property lets you bind any @keyframes animation directly to scroll progress. The browser handles all the interpolation on the compositor thread — buttery smooth, zero JavaScript.

Two Timeline Types

Use scroll() for progress-based animations tied to a scroll container, or view() for animations that trigger as an element enters and exits the viewport. Both compose with existing CSS animations — you write keyframes once and swap the timeline.

DTNRWORKSHOP ARMAMENTSSN 2012.OTT.0176