How to use the scroll-driven animation generator
- Pick an effect. Choose fade, slide up, scale, wipe or unblur, then set the distance, easing and when it starts and finishes. Scroll the preview to see it.
- Name the class. Refract suggests a class such as refract-fade-up. Change it if you like; each effect needs its own class.
- Paste the CSS once. Choose your page builder under Paste into and paste the code into your site-wide custom CSS, such as Elementor’s Site Settings or the WordPress Customiser.
- Add the class anywhere. Add the class to any heading, image, widget or container. Sections around it that would block the animation are fixed automatically.
What are scroll-driven animations?
Scroll-driven animations link a normal CSS animation to scrolling instead of time. animation-timeline: view() tracks an element’s position as it moves through the viewport; animation-timeline: scroll() tracks how far a container, or the whole page, has scrolled. Effects that used to need JavaScript and an IntersectionObserver are now a few lines of CSS.
Understanding animation-range
animation-range sets which part of the scroll drives the animation. entry 0% is the moment the element’s top edge appears at the bottom of the screen; cover 35% is when it’s a little over a third of the way through its journey. Short ranges feel snappy; longer ones feel more gradual.
Browser support and fallbacks
As of October 2026 scroll-driven animations work in Chrome, Edge and Safari 26 and later; Firefox is still working on them. The generated code wraps the effect so browsers without support simply show the content normally, which makes it a safe progressive enhancement.
Not animating on your site? Check these four things
1. A parent hides overflow. If any element around yours has overflow: hidden or overflow-x: hidden, the browser tracks scrolling inside that element instead of the page, and the animation never moves. Page builders do this whenever a section or container’s Overflow is set to Hidden or Auto, and many themes do it to the whole page. Keep “Include the overflow fix” switched on: it changes only the wrappers around your animated element to overflow: clip, which clips content the same way. To find anything it misses, right-click your element, choose Inspect, open the Console tab and paste: for(let e=$0.parentElement;e;e=e.parentElement){const s=getComputedStyle(e);if(![s.overflowX,s.overflowY].every(v=>v==='visible'||v==='clip'))console.log(e,s.overflowX,s.overflowY)}. Every element it lists needs overflow: clip instead of hidden; in Elementor that’s the container’s Layout › Overflow setting. 2. Another animation wins. Turn off the page builder’s own entrance animation, motion effect or transform on the same element. 3. The browser. Test in Chrome, Edge or Safari, not Firefox. 4. Where you start. Reload the page scrolled to the top, then scroll down to the element. Anything already on screen when the page loads is shown straight away.
Using it in WordPress, Elementor, Divi, Bricks and Breakdance
Choose your page builder from Paste into, above the code, and Refract rewrites the CSS for it. Elementor Pro and Divi 5 use the selector keyword, Bricks uses %root% and Breakdance uses %%SELECTOR%%, so the effect only applies to the element you paste it into. Elementor’s newer V4 atomic elements (Heading, Image, Button, Div block) work differently: their Custom CSS sits inside the element’s own style, so Refract splits the code into a part for the element and a part for your site-wide CSS. For the WordPress block editor, free Elementor and Divi 4, you add a CSS class to the element and paste the CSS into your site’s custom CSS. The numbered steps under the code show exactly where to click, and Refract remembers your builder for every tool.
Frequently asked questions
Do I need JavaScript for scroll animations?
Not any more for these effects. Browsers that support animation-timeline run them entirely in CSS, often more smoothly than JavaScript because they can run off the main thread.
Why isn’t the preview animating?
Your browser may not support scroll-driven animations yet. Try the page in Chrome, Edge or Safari 26.
Why does it work here but not on my WordPress site?
Usually because a section or container around it has Overflow set to Hidden or Auto, or the theme sets <code>overflow-x: hidden</code> on the page. It still works on the outer section because nothing above that clips. Keep “Include the overflow fix” switched on and paste the code again. If it still doesn’t move, follow the four checks above to find the element that’s blocking it.
Is it bad for accessibility?
Movement can cause discomfort for some people, so the code disables the animation when prefers-reduced-motion is set. Keep effects subtle and never hide important content until someone scrolls.
Can I use this in Elementor, Divi or Bricks?
Yes. Choose your page builder under Paste into, above the code. The CSS is rewritten for that builder, and the steps underneath tell you exactly where to paste it. WordPress’s block editor and Breakdance are supported too.