Skip to main content

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

CSS
 
Was this helpful?

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

  1. 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/to pair of opacity/transform/clip-path steps.
  2. Choose a timelineview() 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).
  3. Choose an animation range — controls which portion of the timeline the animation plays over. Named ranges like entry and cover describe phases of an element crossing the viewport and are meant for view(); plain percentages like 0% 100% work with either timeline type.
  4. Copy the generated CSS and paste it into your stylesheet, or download it as a .css file.

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.

cssscrollanimationkeyframesgeneratoranimation-timelineweb design

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.