Converging Parallax
Three blurred discs stacked at the centre of a tray glide at three paces — 160, 80 and 240 px over the travel — and meet exactly halfway: offset at the start, superimposed in the middle, offset the other way at the end. The second one also crosses from left to right. Three animations on scroll(), zero JavaScript.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Scroll has 74 effects, including 12 free. Explore the category →
3 usage examples



How it works
The .sdc-parallax-content tray (800 px) holds three .sdc-parallax-layer layers, each on position: absolute; inset: 0 and centred with flexbox, hence three discs laid on the same point: 200, 140 and 100 px across, in violet, pink and cyan radial gradients. Each disc has its own animation on animation-timeline: scroll(), and all of them are symmetrical around zero: translateY from 80 to −80 px for the first, from 120 to −120 px for the third, and for the second 40 to −40 px with a translateX from −30 to 30 px. Above them, .sdc-parallax-text carries a heading and a sentence in the flow, on z-index: 5: that one is not animated.
Symmetrical values have a clear consequence: at 50% of the travel the three offsets are zero at the same time. Read in Chromium 149 and in WebKit 26.5 alike: at 100 px of scrolling, +49.2 px for the large disc, +73.8 for the small one, and the middle one 18.5 px to the left and 24.6 px lower; at 260 px, 0 / 0 / 0, three concentric discs in the middle of the frame; at 400 px, −43.1, −64.6 and the middle one 16.2 px to the right. Relative to the content they climb 31%, 46% and 15% faster. In the 280 px frame: the heading alone up to 77 px, the discs from 77 to 443 px (all of them whole only from 230 to 290 px), then 77 px of empty frame.
As it was sold, the effect stood still in Chromium and in WebKit: the discs were concentric from start to finish. The cause fits in one word, overflow: hidden on the tray, which made it the scroll container nearest to the discs — a container with no travel, hence an inactive timeline. The line became overflow: clip, which crops without hijacking scroll(), and the figures above date from after that fix. The rest is upkeep: selectors under .fx-0557-root, animations renamed fx0557Move, MoveSlow, MoveFast, a focusable area, the sentence raised from 40 to 60% white.
Accessibility
- Reduced motion:
prefers-reduced-motion: reduceremoves the three animations. The discs then stay stacked at the centre of the tray, in the state they otherwise only reach at mid-scroll, and scroll with the content. The heading was never animated; it does not change. - Decoration only: the three layers carry
aria-hidden="true"and contain no text. The discs are pale by construction — 50% opacity over a gradient already at 40%, i.e. 1.2 to 1.35:1 against the background (computed): do not entrust them with any information. The white heading reaches 19.8:1 and the sentence 7.3:1. - Keyboard: the area takes focus with Tab (
tabindex="0"), shows a violet outline and is browsed with the arrow keys; the discs respond as they do to the wheel. Behaviour recorded in Chromium, Firefox and WebKit, which used to pass the area by before this addition. - Touch: native finger scrolling (150 px swiped, 152 px recorded in touch emulation). At 390 px wide the sideways drift of the middle disc (±30 px) stays inside the tray: no horizontal bar, neither in the area nor on the page.
Browser compatibility
No script. It takes animation-timeline: scroll(): Chrome and Edge 115, Safari 26, Firefox 159 according to MDN; overflow: clip has been around longer (Chrome 90, Firefox 81, Safari 16). Same positions to a tenth of a pixel in Chromium 149 and WebKit 26.5. In Firefox 151 the discs do not move: you come across them, concentric, in the middle of the tray. Not tried: Firefox 159+, real Safari, phones.
Outside the @supports (animation-timeline: scroll()) block the discs have no transform at all: they stay superimposed at the centre of the tray. It is a presentable state — a three-ring target — but the meeting, which is the whole effect, does not happen. The heading and the sentence show in every case.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0557-root">
<div class="sdc-scroll-container" tabindex="0" role="region" aria-label="…">
<div class="sdc-parallax-content">
<div class="sdc-parallax-layer" aria-hidden="true">
<div class="sdc-parallax-circle sdc-parallax-circle--1"></div>
</div>
… two more layers: --2, --3
<div class="sdc-parallax-text">
<h3>…</h3>
<p>…</p>
</div>
</div>
</div>
<span class="sdc-scroll-hint" aria-hidden="true">…</span>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
Amplitudes (CSS — @keyframes fx0557Move, fx0557MoveSlow, fx0557MoveFast) |
±80 px, ±40 px, ±120 px | The wider the gap, the faster the disc. As long as start and end are opposite, the meeting happens at mid-scroll; 40 → −120 moves it to the quarter, 120 → −40 to three quarters. |
Sideways drift (CSS — translateX(-30px) → translateX(30px) in fx0557MoveSlow) |
60 px from left to right, middle disc only | Remove it for three vertical paths; add one of opposite sign to another disc so that they cross. Rotating the layer (transform: rotate() on .sdc-parallax-layer) changes the axis of the path. |
Discs (CSS — .sdc-parallax-circle--1 to --3, .sdc-parallax-circle { opacity }) |
200, 140 and 100 px; violet, pink, cyan; opacity .5 | Size, colour and opacity are set per disc. Opaque and on mix-blend-mode: screen, they blend instead of covering each other. |
Travel (CSS — .sdc-parallax-content { height: 800px }) |
800 px, i.e. 520 px of travel | Since offsets are in pixels, a shorter tray concentrates the motion. Keep overflow: clip on this block: with hidden, nothing moves any more. |
Heading (HTML + CSS — .sdc-parallax-text) |
19 px heading and 12 px sentence, 100 px from the top, above the discs | It scrolls with the content. To keep it in place while the discs pass behind, give it position: sticky; top: 0. |
Hint (HTML — span.sdc-scroll-hint) |
“Scroll ↓” over the bottom of the frame | Needed in the demo, since the discs only arrive after 77 px; to be removed elsewhere. |
FAQ
view(). It is a backdrop behind content. Here there is no revealed content and no view(): three objects of the same kind, on three paths that cross at one point. Choose Parallax to dress a list, this one when the meeting itself tells something — colours blending, two images coinciding. For text in parallax, see Parallax Layers CSS.position: sticky; top: 0, as tall as the area: only the offsets move them then. The three examples on this page are built that way.overflow: hidden (or auto, or scroll). For the browser it then becomes the scrolling area nearest to the discs, and scroll() reads its position — which never changes. Replace it with overflow: clip: same cropping, rounded corners included, without the hijack. That was the flaw of the original code, and we reproduced it once ourselves while building the examples.