It seems that you have reduce motion enabled. Animations will not work as designed.
Onload
Onload waits ≈ declared delay; here: delay-1s.
<div class="card anim fade-in onload delay-1s" style="--anim-dur: 600ms">
class="anim fade-in onload delay-1s" style="--anim-dur: 600ms"
Scroll Animations
Scroll animation system provides class-based triggers for smooth, accessible effects.
Animations are activated when elements cross into view, using percentage-based triggers (-atNN) or automatic on-load activation (onload).
- Fade —
fade-in/fade-outwith optional trigger point:fade-in-at60. - Zoom —
zoom-in10/zoom-out20with optional trigger point:zoom-in10-at70. - Slide —
slide-(in|out)-(up|down|left|right)with optional distance:slide-in-right-d64-at50. - Trigger point (
-atNN) — % of viewport height where the effect starts (e.g.,at80= 80% down the screen). - Distance (
-dNN) — pixel offset for slide animations (e.g.,d200= 200px). - Timing — control duration with
--anim-duror utilities:anim-slow,anim-fast,anim-snail,anim-instant. - Delays — add
delay-200,delay-0_5s,delay-2sto sequence animations. - Stagger — apply a staggered effect to children:
stagger-fade-in-at80,stagger-slide-in-right. - One-shot — add
one-shotto run once and not repeat on scroll back.
Combine effects for layered motion (e.g., fade-in-at70 + slide-in-up-d128-at70).
Reduced motion
- Motion is automatically disabled when the user enables
Reduce motionat the OS/browser level viaprefers-reduced-motion: reduce, and for@media print. - When motion is disabled, animated elements snap to their end state (no scrolling/onload transitions) and content remains visible.
- Optional helper banner: add
.reduce_motionto any element to show it only for reduced motion / print.
<section class="reduce_motion">…</section>.reduce_motion{display:none;} @media (print),(prefers-reduced-motion: reduce){.reduce_motion{display:block;}}Guide & Reference
Cheat sheet
onload — run after page load (respects delay; total ≈ declared delay)-atNN — run when element top reaches NN% of viewport (e.g. fade-in-at60).atNN — set default trigger on a container (children inherit if they lack -at)fade-in, fade-outzoom-in10, zoom-out20 (number = % amount)slide-(in|out)-(left|right|up|down)[-d{px}]one-shot — fire once, never revertstagger-<effect>-atNN + stagger-reversedelay-200 | delay-0_5s | delay-2s (underscore for decimals)--anim-dur — duration (e.g. 600ms)--anim-delay — set by delay-* classes--anim-stagger-step — stagger gap (default 120ms)Delay behavior
- Onload: we wait roughly
(declared delay − duration), then start the transition with no extra CSS delay. Net time to fully visible ≈ your declared delay. - Scroll triggers: we toggle active immediately on trigger; CSS delay runs inside the transition. Perceived wait ≈ your declared delay.
- Accepted formats:
delay-200(ms),delay-0_5s,delay-1_5s,delay-2s.
Effect combos & conflict rules
- Slide-ins already fade-in. Prefer
slide-in-*alone, or pair withfade-outfor exit. - fade-out dominates other effects when active (we turn off fade-in/zoom/slide-in so the element can disappear cleanly).
Tips
- Per-element speed: set
style="--anim-dur: 1200ms"or use utility classes (.anim-slow,.anim-fast). - Default trigger via container: wrap items in
.at55so any child without-atNNuses 55%. - Accessibility: focus/keyboard users are kept visible (see
.anim:focus-within).
Fade In / Out @ thresholds
Triggers when the element’s top reaches the given % of viewport height.
class="anim fade-in-at75"
class="anim fade-in-at50 fade-out-at20"
class="anim one-shot fade-in-at60"
class="anim fade-in-at25 delay-200"
class="anim fade-in-at35 delay-0_3s"
Zoom
zoom-in10 = start at ~0.90 scale → 1.00. zoom-out20 = start at ~1.20 → 1.00.
class="anim zoom-in10-at50"
class="anim zoom-in20-at50"
class="anim zoom-out10-at50"
class="anim zoom-out20-at50 fade-out-at20"
Slide In / Out (directions + distance)
Slide-ins already include opacity. Use -d{px} to override distance.
Animation Speed Utilities
These examples use .anim-slow, .anim-fast, .anim-snail, and .anim-instant.
0ms duration
300ms duration
1400ms duration
4000ms duration
Default Trigger via .atNN
Container has .at55. Children inherit 55% when their effect has no explicit -atNN.
class="anim fade-in"
class="anim zoom-in10"
Stagger
Applies effect to children, offset by --anim-stagger-step (default 120ms). Add stagger-reverse to reverse order.
stagger-fade-in-at80
- One
- Two
- Three
- Four
- Five
class="stagger-fade-in-at80"
stagger-fade-in-at80 + stagger-reverse
- One
- Two
- Three
- Four
- Five
class="stagger-fade-in-at80 stagger-reverse"
Combined Examples
Common patterns that play nicely with the conflict rules.
It seems that you have reduce motion enabled!