Unleash The Power Of Scroll-Driven Animations

October 23, 2024

  • A scroll-driven animation is an animation that responds to scrolling. There’s a direct link between scrolling progress and the animation’s progress.
  • Scroll-driven animations are different than scroll-triggered animations, which execute on scroll and run in their entirety. Scroll-driven animations pause, play, and run with the direction of the scroll. It sounds to me like scroll-triggered animations are a lot like the CSS version of the JavaScript intersection observer that fires and plays independently of scroll.
  • Why learn this? It’s super easy to take an existing CSS animation or a WAAPI animation and link it up to scrolling. The only “new” thing to learn is how to attach an animation to scrolling. Plus, hey, it’s the platform!

Source: Unleash The Power Of Scroll-Driven Animations | CSS-Tricks

Scroll-driven animations are a relatively new but already well supported CSS feature, that leverages existing CSS animations in ways that needed JavaScript until now.