CSS Scroll-Driven Animation Generator
Generate a native CSS scroll-driven animation — a @keyframes block wired to animation-timeline: view() or scroll() instead of a fixed duration — from ready-made presets (fade in, slide in, scale up, rotate in, reveal clip-path) with a configurable animation range.
Input
view() animates as the element enters the viewport; scroll() ties it to page-scroll progress.
Named ranges (entry/cover) pair with view(); scroll() timelines only understand plain percentages.
Output
Guides
A scroll-driven animation ties an element's animation progress to scroll position instead of wall-clock time, using the native CSS animation-timeline property. Set it to view() and an element fades, slides, scales, rotates, or reveals itself as it enters the viewport; set it to scroll() and the animation tracks the scroll progress of the page (or a scroll container) directly — a scroll-linked progress bar, parallax layer, or reveal effect with zero JavaScript, driven entirely by the compositor.
This generator builds both halves for you: a @keyframes block with the right from/to steps for a chosen preset, and the accompanying rule that wires it up with animation-timeline and animation-range in place of a fixed animation-duration. Copy both into your stylesheet and swap .scroll-animate for your own selector.
Browser support
Scroll-driven animations are a relatively new CSS feature. As of this writing, Chrome and Edge (115+) support animation-timeline: scroll() and view() natively. Firefox and Safari do not yet ship support behind default settings, so treat this as progressive enhancement: pair it with a @supports not (animation-timeline: view()) block that sets the element's final (to) state directly, so unsupported browsers still show a sensible, static result instead of an element stuck invisible or off-screen. Always check caniuse.com/css-scroll-timeline for the current state before relying on this in production.
How to use it
- Pick a preset — Fade In, Slide In (from left/right/bottom), Scale Up, Rotate In, or Reveal Clip Path. Each is a ready-made
from/topair ofopacity/transform/clip-pathsteps. - Choose a timeline —
view()animates the element as it scrolls into and through the viewport (best for "reveal on scroll" effects);scroll()ties the animation to the overall scroll progress of the nearest scroll container (best for progress bars and parallax-style effects). - Choose an animation range — controls which portion of the timeline the animation plays over. Named ranges like
entryandcoverdescribe phases of an element crossing the viewport and are meant forview(); plain percentages like0% 100%work with either timeline type. - Copy the generated CSS and paste it into your stylesheet, or download it as a
.cssfile.
FAQ
Why is the selector .scroll-animate?
It's a placeholder so the CSS is ready to paste — rename it to match the element you want to animate.
What does animation-range actually control?
It maps a portion of the scroll timeline to the animation's 0%–100% progress. entry 0% cover 100%, for example, starts the animation the moment the element begins entering the viewport and finishes once it's fully covering (scrolled past) that entry phase.
Why isn't there an animation-duration?
Scroll-driven animations don't run on a clock — their "duration" is however much of the scroll range you assign them via animation-range. Setting an explicit duration isn't needed (and is ignored by the timeline mechanism).
What happens in browsers that don't support this yet?
Without support, animation-timeline is simply ignored, so the element stays in its default (from) state — typically invisible or offset. Add an @supports not (animation-timeline: view()) block with the element's final styles as a static fallback.
Can I animate more than opacity and transform?
Yes — any animatable CSS property works inside @keyframes, including clip-path as used by the Reveal preset here. Transform and opacity are favored because they're compositor-friendly and stay smooth during scroll.
Privacy
Everything runs locally in your browser — your settings never leave your device, and no CSS is sent to a server to be generated.