Scroll-Driven Fade
The block rises 60 px while fading in for the whole of its entry into the frame, no more, no less: it reaches its place at the exact moment it is fully in. 87 px of scrolling for an 87 px block, animation-range: entry on animation-timeline: view(), not one line of 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
A 280 px scrolling area, a centred column tray (.sb-sdfade-content) and five 260 px blocks (.sb-sdfade-box). Each block starts at opacity: 0 and translateY(60px); the fx0545FadeUp keyframe brings it back to its place, opaque. Progress is plugged into animation-timeline: view() with the range animation-range: entry, no percentage: from the moment the top of the block crosses the bottom of the area to the moment its bottom edge crosses it in turn.
The motion therefore lasts exactly the block's height. An 87 px block takes 87 px of scrolling to settle, a 108 px card takes 108: tall blocks rise for long, short ones quickly, with no tuning. Since the block makes up 60 px of lag during that trip, it moves on screen about 1.7 times faster than the rest of the list, then falls in line. Recorded on the demo, block 3: 11% opacity and 53 px behind after 40 px of scrolling, 57% and 26 px after 80 px, in place at 120 px.
A less obvious consequence: you almost never see a very pale block. Below 41% opacity, its offset still keeps it under the bottom edge; it emerges already half visible and finishes brightening as it reaches its place. When the demo opens, block 2 is at 94% and 4 px from its position, block 3 is hidden. The tray takes the height of its content (399 px of travel) and the animated rule sits under @supports, so nothing is hidden from browsers that do not follow.
Accessibility
- Reduced motion: no more rising. The
prefers-reduced-motion: reducequery cancels the translation (transform: none) and swaps the animation forfx0545Fade, which only touches opacity: the block brightens in place as it enters. Without the offset it is then visible from the edge, very pale at first — recorded: block 2 at 94%, block 3 at 0% just below the frame. - Keyboard: the area is a tab stop (
tabindex="0") with a visible outline; once on it, the arrow keys scroll and the blocks rise. Three engines tried, three identical behaviours, whereas WebKit passed the area by in the original code. A screen reader announces it as a region carrying the suppliedaria-label. - Content added later: if a script inserts blocks into the area (a “Show more” button), those that already land inside the frame appear straight in their current state, without playing the rise. Also tell screen readers about the addition (
aria-liveon a message, or moving focus): the sold code does not handle that. - Touch and legibility: native finger scrolling, recorded with touch emulation. The white heading is strongly contrasted over the block background; the grey line (white at 50%) sits around 5.3:1 once the block has settled. The bottom hint, hidden from screen readers, stays readable at its minimum (50% opacity).
Browser compatibility
Pure CSS. The rise depends on two recent properties, animation-timeline and animation-range: Chrome 115, Edge 115, Safari 26; Firefox 159 according to MDN. Chromium 149 and WebKit 26.5 give the same figures (block 4 at 68% and 19 px behind after 200 px). In Firefox 151 the @supports test fails: five visible, still blocks, scrollable area. The Firefox versions that announce support were not available for the test.
Nothing to plan. The zero opacity and the 60 px offset are declared inside @supports (animation-timeline: view()); a browser that fails that test keeps the blocks opaque, in their place. The page stays readable and complete, only without the rise.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0545-root">
<div class="sdc-scroll-container" tabindex="0" role="region" aria-label="…">
<div class="sb-sdfade-content">
<div class="sb-sdfade-box">
<h4>…</h4>
<p>…</p>
</div>
… ×5
</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 |
|---|---|---|
Height of the rise (CSS — transform: translateY(60px)) |
60 px | With 20 px the block shows earlier (from 19% opacity for an 87 px block) and the motion becomes a mere shiver; with 120 px it only emerges at 58% and catches up with the list almost 2.4 times faster. |
Range (CSS — animation-range: entry) |
the whole entry (0 → 100%) | entry 0% entry 50% gives the short version of Fade Up, done at mid-entry. entry 20% entry 100% delays the start without changing the finish. |
Block width (CSS — .sb-sdfade-box { width: 260px }) |
260 px, centred | width: auto and align-items: stretch on the tray for a full-width list; a grid on the tray makes each row rise as one. |
Scrolling area (CSS — .sdc-scroll-container { height: 280px }) |
280 px | Remove height and overflow-y to follow the page scroll: each block finishes rising when its bottom edge passes the bottom of the screen. |
Curve (CSS — animation-timing-function: linear) |
linear | ease-out makes the block emerge earlier and settles it softly; ease-in keeps it under the edge almost to the end, then makes it spring out. |
Dressing (CSS — .sb-sdfade-box) |
white background at 4%, border at 8%, 14 px corners, centred text | All of it can be replaced: light background, left alignment, a dividing rule instead of a card. The animation depends on none of these values. |
FAQ
animation-range gives you the other.