Zoom Into Content
A whole group — heading, sentence, button — coming in from the back of the screen: starting at 30% of its size, transparent and blurred by 8 px, it is sharp and full-size when its centre reaches the middle of a 280 px frame. Blocks are separated by 200 px of empty space, so only one fills the frame at a time. view(), range entry → cover 50%, CSS only.
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 .zoom-container area (280 px, vertical scrolling) lines up blocks and gaps: a 30 px spacer, the .zoom-content block (a gradient title, a sentence, a link button, 130 px in all), a 200 px spacer, the .zoom-second block (one paragraph, 81 px), a last 200 px spacer. It is not each line that is animated but the block as a whole: title, sentence and button grow together, from the centre of the block.
Under @supports (animation-timeline: view()), both blocks start at transform: scale(.3); opacity: 0; filter: blur(8px) and the fx0570Zoom keyframe brings the three values back to normal. The animation-range: entry cover 50% range begins when the top of the block meets the bottom of the frame and ends when its centre passes the middle. For the second block that is 180 px: read at 81 px of scrolling for the start, 261 px for the end, with 22% opacity, 46% size and 6.2 px of blur at 120 px on the way, then 67%, 77% and 2.7 px at 200 px.
The first block, for its part, does not zoom in the demo: placed 30 px below the top of the frame, its centre is already above the middle on load, so it is sharp from the outset. The zoom is for what comes in from below. A block leaving through the bottom when you scroll back up replays the path in reverse; a block that left through the top stays sharp. The travel follows the content (361 px) and two copies on a page scroll separately, since selectors and keyframe belong to this root.
Accessibility
- Reduced motion: a zoom from 30% to 100% with blur is among the motions to avoid. Under
prefers-reduced-motion: reducethe rule setstransform: none; filter: noneand swaps the keyframe forfx0570Fade: measured at 120 px of scrolling, second block at 22% opacity, no scale and no blur. What is left is a fade in place. - Legibility along the way: until the block reaches the middle of the frame, its text is small and blurred. Do not put inside an animated block something that must be read at first glance the moment it shows, and avoid a block taller than the frame (see the FAQ): its first lines would reach the top of the screen still blurred.
- Keyboard: the area takes focus (
tabindex="0",role="region",aria-label, 2 px violet outline) in all three engines; four down-arrow presses move it 160 px in Chromium, 204 px in Firefox. The block's button is a real link (<a href>) with its white focus outline: replace itshref="#". - Reading and contrast: a transparent or shrunk block is read normally by a screen reader. The title is a
divto turn into a heading of your level. The title gradient runs from 4.4:1 to 5.7:1 on the background (enough for text of that size), the sentence sits at 7.3:1, the button's white text between 4.2:1 and 4.5:1. - Touch: native scrolling, 151 px of travel for a 150 px drag in Chromium emulation at 390 px wide, where the block spans the full width of the frame.
Browser compatibility
CSS only. The zoom needs animation-timeline: view() and animation-range: Chrome and Edge 115, Safari 26, Firefox 159 per MDN. Same readings in Chromium 149 and WebKit 26.5 (second block at .22 opacity, .46 size and 6.2 px of blur at 120 px in both). Firefox 151: both blocks are sharp and full-size, the area scrolls over 355 px. The gradient title is written with -webkit-background-clip: text, understood by all these engines; the background: … text shorthand of the original code has only been read by Chrome since version 120.
The three starting values (scale, opacity, blur) only exist under @supports: a browser without view() shows ordinary blocks, separated by their spacers. The content is therefore always readable; it simply does not arrive “from the back”.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0570-root">
<div class="zoom-container" tabindex="0" role="region" aria-label="…">
<div class="zoom-spacer-start"></div>
<div class="zoom-content">
<div class="zoom-hero-title">…</div>
<div class="zoom-hero-subtitle">…</div>
<a class="zoom-hero-btn" href="#">…</a>
</div>
<div class="zoom-spacer-end"></div>
<div class="zoom-second">
<p>…</p>
</div>
<div class="zoom-spacer-end"></div>
</div>
<span class="slr-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 |
|---|---|---|
Starting size (CSS — scale(.3), under @supports and in fx0570Zoom) |
.3 | Write the same value in both places. .6 gives a quieter approach; below .2 the block is a mere dot during the first third of the path. |
Blur (CSS — filter: blur(8px), same two places) |
8 px | blur(0) keeps a sharp zoom, lighter to compute on a large block. Beyond 12 px the text stays unreadable for a good half of the range. |
Range (CSS — animation-range: entry cover 50%) |
from the bottom edge to the middle of the frame: 180 px for an 81 px block | The length is (frame height + block height) ÷ 2. entry cover 30% finishes lower in the frame; entry alone finishes as soon as the block is in. |
Spacers (CSS — .zoom-spacer-start { height: 30px }, .zoom-spacer-end { height: 200px }) |
30 px before, 200 px between blocks and after | 200 px isolate each block in a 280 px frame. Tried with 200 px before the first block: it opens mid-zoom (39% opacity, 57% size, 4.9 px of blur) and completes in 125 px. |
Animated blocks (HTML — the .zoom-content class) |
two blocks: .zoom-content and .zoom-second |
Put .zoom-content on as many blocks as you like, each tracks its own position. The title, sentence and button are optional: any content can be zoomed. |
Area (CSS — .zoom-container { height: 280px }) |
280 px | Keep a height in pixels or give the parent a fixed height: as a percentage inside a parent with no height, nothing scrolls. Without height or overflow, view() follows the page's scrolling. |
Hint (HTML — span.slr-scroll-hint) |
“Scroll to zoom” | A demo marker that bounces by 4 px at the bottom of the root. Remove it in production. |
FAQ
entry cover 50%), and so is the focusing. What changes: Blur to Clear only touches blur (10 px) and opacity, with no size change at all, on a list of closely packed blocks. Zoom Into Content adds a zoom from 30%, trims the blur to 8 px and applies it to a complete group — title, sentence, button — isolated by 200 px of empty space. The former suits a list that must not deform; this one a few strong messages shown one by one. View Timeline Scale is the third setting of the family: a 70% scale, no blur.entry cover 30%).