Blinds Effect
Six slats unroll from top to bottom, one after the other 50 ms apart, close the screen like a blind, the page changes behind, then they fold back: the only slatted curtain in the category, 1.45 s, animated in scaleY — CSS + 1.5 KB of JavaScript.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Transitions has 52 effects, including 9 free. Explore the category →
3 usage examples



How it works
The blind is .blinds-container: a flex column stretched over the .transition-preview screen above the pages (z-index: 10), transparent to clicks, stacking six equal-height .blind-strips (flex: 1) in a cyan to violet gradient. At rest, transform: scaleY(0), with the origin at the top, folds them all.
On click, the container gets .animating; each slat plays @keyframes blindStrip over 1.2 s ease-in-out: scaleY(0) → 1 at 40%, held until 60%, back to 0. The offset is written in the HTML: animation-delay of 0, 0.05, 0.1, 0.15, 0.2 and 0.25 s, from the top slat to the bottom one. The first is unrolled from 0.48 s to 0.72 s, the last from 0.73 s to 0.97 s: the script toggles .is-b on .transition-preview at 0.725 s, when all six cover (measured in Chromium 151 and Firefox 153: six slats at scaleY(1) at swap time), and removes .animating at 1.45 s, when the last one has folded back — no slat vanishes abruptly. Each slat also has margin-bottom: -1px: six 33.3 px bands do not have whole-pixel edges, and that one-pixel overlap closes the slit that would reveal the swap (measured at 1.5 scale: 3,944 page pixels visible without it in Chromium 151, 0 with it).
Once the blind is up, B stays shown until the next click, which closes it again and opens on A (checked in Chromium, Firefox and WebKit).
Accessibility
- Reduced motion: under
prefers-reduced-motion: reduce, the slats stay folded and the page changes through a 150 ms fade (measured: blind still, B readable in under 250 ms). - Keyboard and screen readers: Fade Through's button (fx-0685), focus kept during the blind; empty slats and the hidden page are not read. On a display that rotates by itself (a board, a bus shelter), only add
aria-live="polite"if someone must be told, or the announcement would come back every 20 s.
Browser compatibility
CSS (@keyframes on transform: scaleY(), flexbox, animation-delay, inset) + 1.5 KB of JavaScript, no dependency. Measured in Chromium 151, Firefox 153 and WebKit 26.5: six slats unrolled at swap time, page B held, back to A on the next click, focus kept, direct swap under reduced motion. inset sets the minimum versions: Chrome 87, Firefox 66, Safari 14.1.
Without JavaScript, the blind stays folded over page A and the button does nothing: provide a regular link to the next content. Without inset (Safari before 14.1), write top: 0; right: 0; bottom: 0; left: 0 on .transition-content and .blinds-container.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="bls-stage">
<div class="transition-preview">
<div class="transition-content old-content">Page A</div>
<div class="transition-content new-content">Page B</div>
<div class="blinds-container">
<div class="blind-strip" style="animation-delay: 0s;"></div>
… (6 slats, 0.05 s apart)
</div>
</div>
<button type="button" class="trigger-btn">Trigger Transition</button>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
Number of slats (HTML — .blind-strip and their animation-delay; JS — SWAP_AT, END_AT) |
6 slats, 0 to 0.25 s | All slats must cover together at some point: the last delay must stay under 0.25 s. For 8 slats, set the gap to 0.035 s (last delay 0.245 s); SWAP_AT stays at 725 and END_AT is 1,200 + the last delay. |
Slat material (CSS — .blind-strip { background }) |
#0e7490 → #7c3aed gradient | A metal gray and a bottom edge (border-bottom: 2px solid #8a929b) give a roller shutter; a dark line in the middle, an airport flap. |
Unrolling direction (CSS — transform-origin: center top) |
top to bottom | center bottom makes each slat rise from its bottom; also reverse the delay order for a cascade going up. |
Gap between slats (HTML — animation-delay) |
0.05 s | 0.03 s closes the blind almost in one piece; 0.08 s makes the cascade very readable, but the last delay (0.4 s) goes past the window where all cover: then reduce the number of slats. |
Content (HTML — .old-content, .new-content) |
"Page A" and "Page B" on two gradients | Any HTML. For a display that rotates by itself, call btn.click() on a timer after filling the hidden layer. |
FAQ
scaleY(1); at 0.725 s the first has barely started rising and the last has nearly finished coming down (measured: six slats at scaleY(1.00) rounded). A swap at 0.6 s would show B in the three bottom slats, still incomplete (measured at 0.6 s in all three engines: about 0.98, 0.93 and 0.84).stage.querySelector('.trigger-btn').click() in a 20,000 ms setInterval; the button can be visually hidden. Under reduced motion the swap stays direct, with a 150 ms fade: the display rotates without animating the blind.