Motion Library ‹ Free tools

All / Parallax

Reusable data-speed parallax

A tiny drop-in script: put data-speed on any element and it moves at that speed relative to the scroll. Negative values go the other way.

CSSJavaScriptBeginner
Live demo Open full screen

Good for

Your default starting point. Copy this script into any project and sprinkle data-speed wherever you want depth.

Watch out for

Measure the parent, not the element, because the element is being transformed. Skip anything far off screen to stay fast.

Accessibility

Wrap motion in @media (prefers-reduced-motion: reduce) and switch it off or shorten it for people who ask for less movement.