<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/for-the-love-of-scroll-driven-animations-in-css-udigcxeby" -->

---
title: For the love of scroll driven animations in CSS | daily.dev
description: Scroll-driven animations in CSS, using the new scroll-timeline and animation-timeline: scroll() features available in Chrome Canary, are explored through...
canonical: https://daily.dev/posts/for-the-love-of-scroll-driven-animations-in-css-udigcxeby
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: For the love of scroll driven animations in CSS | daily.dev
og:description: Scroll-driven animations in CSS, using the new scroll-timeline and animation-timeline: scroll() features available in Chrome Canary, are explored through...
og:url: https://daily.dev/posts/for-the-love-of-scroll-driven-animations-in-css-udigcxeby
og:image: https://api.daily.dev/og/posts/udIgcxeBy.png
og:image:alt: For the love of scroll driven animations in CSS
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# For the love of scroll driven animations in CSS

**[utilitybend](https://daily.dev/sources/utilitybend)** · 7 min read · 0 upvotes · 0 comments

## Summary

Scroll-driven animations in CSS, using the new scroll-timeline and animation-timeline: scroll() features available in Chrome Canary, are explored through practical demos. Examples include a reveal-on-scroll button, a scroll progress animation, and naming custom scroll timelines with timeline-scope to bind animations to non-child elements. The piece covers feature detection with @supports, respecting prefers-reduced-motion, and notes that timeline-scope ships in version 116 while the spec is still evolving on the CSSWG GitHub. The author suggests this CSS feature could reduce reliance on JavaScript animation libraries like GSAP since transform-based animations run off the main thread at high refresh rates.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://utilitybend.com/blog/for-the-love-of-scroll-driven-animations-in-css>

## Questions this post answers

### How do I use CSS scroll-timeline to trigger an animation when a user scrolls the page?

Add animation-timeline: scroll(root) to an element that already has a keyframe animation defined, and the keyframe percentages will map to scroll percentage instead of time. The scroll() function accepts a scroller (root or nearest) and a direction (horizontal, vertical, block, or inline), with block nearest as the default when no arguments are given.

_See how daily.dev surfaces the latest CSS animation techniques as browser support evolves._

### How do I bind a CSS animation to a scroll container that isn't the root or an ancestor of the animated element?

Name the scrolling element's timeline with scroll-timeline: --myTimeline block, then add timeline-scope: --myTimeline on a shared wrapping parent so the named timeline is visible to elements outside the scroller's direct hierarchy. The target element then references it with animation-timeline: --myTimeline instead of the scroll() function. Note that timeline-scope shipped in Chrome version 116, later than the base scroll() function.

_daily.dev helps developers track which CSS features land in which browser version before shipping._

### Can CSS scroll-driven animations replace JavaScript animation libraries like GSAP?

CSS scroll-timeline animations can replace many use cases currently handled by heavy JavaScript libraries such as GSAP, particularly for scroll-triggered effects. Because transform-based CSS animations run off the main thread, they perform smoothly at high refresh rates like 120hz without the overhead of a JavaScript animation library.

_Developers weighing CSS versus JavaScript animation libraries can follow ongoing spec discussions via daily.dev._

## Similar posts on daily.dev

- [Scroll-driven CSS animations](https://daily.dev/posts/scroll-driven-css-animations-uw6plcluy) · Flavio Copes · 142 upvotes · 6 comments
- [Scroll-Driven Animations • Josh W. Comeau](https://daily.dev/posts/scroll-driven-animations-josh-w-comeau-e7cur5pha) · Josh W Comeau · 432 upvotes · 36 comments
- [A First Look at Scroll-Triggered Animations](https://daily.dev/posts/a-first-look-at-scroll-triggered-animations-evfbfrvso) · CSS-Tricks · 26 upvotes · 1 comments

---

Tags: [#css](https://daily.dev/tags/css), [#google-chrome](https://daily.dev/tags/google-chrome), [#web-animation](https://daily.dev/tags/web-animation)

[View this post on daily.dev](https://daily.dev/posts/for-the-love-of-scroll-driven-animations-in-css-udigcxeby)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"For the love of scroll driven animations in CSS","url":"https://daily.dev/posts/for-the-love-of-scroll-driven-animations-in-css-udigcxeby","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/for-the-love-of-scroll-driven-animations-in-css-udigcxeby"},"datePublished":"2026-09-20T07:43:31.904Z","dateModified":"2026-09-20T07:44:55.424Z","description":"Scroll-driven animations in CSS, using the new scroll-timeline and animation-timeline: scroll() features available in Chrome Canary, are explored through...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ca22a14da90e54a27b497047b7967b27?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ca22a14da90e54a27b497047b7967b27?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"utilitybend","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"utilitybend","logo":"https://media.daily.dev/image/upload/s--hONVFSz4--/f_auto,q_auto/v1789890196/logos/utilitybend?_a=BAMAMicg0","url":"https://daily.dev/sources/utilitybend"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/for-the-love-of-scroll-driven-animations-in-css-udigcxeby","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css,google-chrome,web-animation","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"utilitybend","item":"https://daily.dev/sources/utilitybend"},{"@type":"ListItem","position":3,"name":"For the love of scroll driven animations in CSS"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/for-the-love-of-scroll-driven-animations-in-css-udigcxeby#faq","mainEntity":[{"@type":"Question","name":"How do I use CSS scroll-timeline to trigger an animation when a user scrolls the page?","acceptedAnswer":{"@type":"Answer","text":"Add animation-timeline: scroll(root) to an element that already has a keyframe animation defined, and the keyframe percentages will map to scroll percentage instead of time. The scroll() function accepts a scroller (root or nearest) and a direction (horizontal, vertical, block, or inline), with block nearest as the default when no arguments are given. See how daily.dev surfaces the latest CSS animation techniques as browser support evolves."}},{"@type":"Question","name":"How do I bind a CSS animation to a scroll container that isn't the root or an ancestor of the animated element?","acceptedAnswer":{"@type":"Answer","text":"Name the scrolling element's timeline with scroll-timeline: --myTimeline block, then add timeline-scope: --myTimeline on a shared wrapping parent so the named timeline is visible to elements outside the scroller's direct hierarchy. The target element then references it with animation-timeline: --myTimeline instead of the scroll() function. Note that timeline-scope shipped in Chrome version 116, later than the base scroll() function. daily.dev helps developers track which CSS features land in which browser version before shipping."}},{"@type":"Question","name":"Can CSS scroll-driven animations replace JavaScript animation libraries like GSAP?","acceptedAnswer":{"@type":"Answer","text":"CSS scroll-timeline animations can replace many use cases currently handled by heavy JavaScript libraries such as GSAP, particularly for scroll-triggered effects. Because transform-based CSS animations run off the main thread, they perform smoothly at high refresh rates like 120hz without the overhead of a JavaScript animation library. Developers weighing CSS versus JavaScript animation libraries can follow ongoing spec discussions via daily.dev."}}]}
```

