Scroll-driven animations (animation-timeline: scroll() / view())
Chrome 115, Safari 26.0; Firefox detrás de `layout.css.scroll-driven-animations.enabled` en estable, habilitado en Firefox 158 Nightly (según caniuse). Área de foco de Interop 2026; Baseline previsto para finales de 2026.
Chrome 115
Edge 115
Safari 26
Firefox flag (158 nightly)
Controla una animación de keyframes por la posición del scroll en lugar del tiempo: barras de progreso de lectura, revelado al hacer scroll, parallax y cabeceras que encogen, todo fuera del hilo principal y sin listeners de scroll.
Scroll to reveal these.
.fx-039-bar {
position: sticky;
top: 0;
z-index: 1;
height: 4px;
background: #2563eb;
width: 100%;
transform-origin: 0 50%;
animation: fx-039-grow linear both;
animation-timeline: scroll(root)
}
@keyframes fx-039-grow {
from {
scale: 0 1
}
to {
scale: 1 1
}
}
.fx-039 {
font-family: system-ui;
display: grid;
gap: 24px;
padding: 40vh 0
}
.fx-039-item {
padding: 24px;
background: #f3f4f6;
border-radius: 12px;
animation: fx-039-reveal linear both;
animation-timeline: view();
animation-range: entry 0% entry 60%
}
@keyframes fx-039-reveal {
from {
opacity: 0;
translate: 0 30px
}
}
@media (prefers-reduced-motion: reduce) {
.fx-039, .fx-039 * { animation: none; transition: none; }
}
<section class="fx-039">
<div class="fx-039-bar"></div>
<p>Scroll to reveal these.</p>
<div class="fx-039-item">One</div><div class="fx-039-item">Two</div><div class="fx-039-item">Three</div>
</section>Fallback: Los navegadores sin soporte no reproducen nada y muestran el estado final (relleno `both` + sin timeline = estático); envuelve el estado `from` oculto en `@supports (animation-timeline: scroll())` si el estado inicial parpadearía.