Slide In CSS Native
A slow slide, spread over the block's climb: starting 60 px to one side at the bottom edge of the frame, it only joins its column after 143 px of scrolling, when its top edge reaches mid-height. Left or right depending on its class, range entry → cover 40%, animation-timeline: view(), no script.
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 skeleton is that of a list: a 280 px scrolling area (.sdc-scroll-container), a column tray (.sb-slidecss-content, 20 px between blocks) and six full-width blocks carrying either .sb-slidecss-left or .sb-slidecss-right. Under @supports, both classes get opacity: 0, an animation driven by view() and a starting offset: translateX(-60px) for the first, translateX(60px) for the second. The fx0550SlideLeft and fx0550SlideRight keyframes both bring the block back to zero.
What is particular is the animation-range: entry cover 40% range. The motion does not stop once the block is in: it carries on to 40% of the crossing of the frame, that is (280 + 79) × 0.4 = 143 px for the demo's blocks. Meanwhile the block climbs 143 px and moves 60 px sideways: its path is a gentle diagonal, not a sideways jab. It is in place when its top edge reaches 136 px, roughly the middle of the frame.
On load you therefore see three states at once, without touching anything: block 1 in place, block 2 at 84% opacity and still 9 px from its column, block 3 at 15% and 51 px away (recorded values). The lower half of the frame is permanently filled with blocks on their way. Two precautions are in the code: the area clips whatever sticks out sideways (overflow-x: hidden), and the tray has 72 px of bottom padding so the last block can climb high enough to finish its trip (recorded at the end of travel, at 426 px: last block in place, opaque).
Accessibility
- Reduced motion: the sideways drift goes away. The block is set back to
transform: noneand thefx0550Fadekeyframe only varies opacity, over the same long range: the lower blocks brighten as they climb (recorded: block 3 at 15% opacity, no offset). The bottom hint is frozen and smooth scrolling switched off. - Moving text: a block takes 143 px to settle, and during that trip it is both offset and partly transparent. A long paragraph would be tiring to follow there: keep blocks short (a heading, one line), or cut the distance to 24 px for running text.
- Keyboard: the list can be browsed without a mouse. Tab puts focus on the area, shown by a 2 px outline; each arrow key moves it one notch and the blocks drift at the same pace. Observed in Chromium, Firefox and WebKit — the latter ignored the area before
tabindex="0"was added.role="region"andaria-labelname it for screen readers. - Touch: finger scrolling is native (150 px drag checked with touch emulation). On a phone ±60 px weighs more than on a wide screen — nearly a sixth of the width at 390 px. The area clips whatever sticks out sideways: no stray horizontal scrolling.
Browser compatibility
A style sheet only, no library. The drift exists only where animation-timeline and animation-range are recognised: Chrome 115, Edge 115, Safari 26, and Firefox 159 per the MDN tables. Tests run in Chromium 149 and WebKit 26.5: same readings in both (block 2 at 84% and 9 px from its place at rest). Before the sideways clipping, WebKit was 5 px off: its horizontal bar shortened the frame by 17 px. Firefox 151 shows the list static. Nothing was tried in Firefox 159 or later.
Outside @supports (animation-timeline: view()) the blocks have neither offset nor transparency: the list is simply there. That is also what a Firefox 151 visitor sees. The only visible leftover is the 72 px of padding under the last block.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0550-root">
<div class="sdc-scroll-container" tabindex="0" role="region" aria-label="…">
<div class="sb-slidecss-content">
<div class="sb-slidecss-left">
<h4>…</h4>
<p>…</p>
</div>
<div class="sb-slidecss-right">
<h4>…</h4>
<p>…</p>
</div>
… ×3 pairs
</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 |
|---|---|---|
Length of the drift (CSS — animation-range: entry cover 40%) |
up to 40% of the crossing (143 px here) | cover 25% settles the block in the bottom third, cover 50% only at the exact middle. Going back to entry entry 50% gives the short slide of Slide In. |
Tray bottom padding (CSS — .sb-slidecss-content { padding: 60px 16px 72px }) |
72 px | Useful minimum: 0.4 × area height − 0.6 × block height (65 px for 280 and 79). Below that the last block stays offset and pale at the end of the list. |
Sideways offset (CSS — translateX(∓60px) under @supports) |
60 px each side | Over a 143 px drift, 60 px gives a diagonal of about 23°; 120 px opens it to 40°, 24 px makes it almost vertical. The direction stays set by the class. |
Block class (HTML — sb-slidecss-left / sb-slidecss-right) |
alternating in the demo | Assign the side by content (outbound/return, landed/sold): no rule counts the blocks. One class for the whole list works too. |
Block width (CSS — to add: width, align-self) |
full width | At 66% or 88% with align-self: flex-start / flex-end, each block stays on the side it came from and the direction still reads at rest. |
Curve (CSS — animation-timing-function: linear) |
linear | ease-out does most of the sideways travel in the first third of the climb and then lets the block finish gently; linear keeps a steady diagonal. |
FAQ
animation-range gets you most of the other.overflow-y from the area and view() takes the window as its frame. The drift then gets very long — 0.4 × (window height + block height), close to 400 px on a 900 px screen. Cut it to cover 20% if that is too much, and clip sideways overflow on a parent (overflow-x: clip).