

813: CSS: Scroll Driven Animations
Aug 26, 2024
Discover the latest in CSS with scroll-driven animations that transform web design! Explore how these animations can enhance user experiences through dynamic interactions. Dive into animation-timeline and animation-range to control visuals based on scroll position. The discussion also addresses browser compatibility and the use of polyfills. Get inspired by practical examples and clever techniques that make layouts 'stuck' as you scroll, bringing a fresh twist to your web projects!
AI Snips
Chapters
Transcript
Episode notes
Scroll-Driven Animations
- Scroll-driven animations in CSS and JavaScript offer new ways to enhance user experience.
- These animations use scroll position instead of time, making interactions smoother and more engaging.
Key CSS Properties
- Learn the two new CSS properties:
animation-timeline
andanimation-range
. - Control animations based on scroll position or an element's visibility on the page.
Wes's Website Example
- Wes used scroll-driven animations on his TypeScript website to scale cards on scroll.
- He adjusted the animation to occur within the first 50% of the viewport using view-based timelines.