Loading...
.progress {
animation-timeline: scroll();
animation: grow linear;
}.progress {
animation: grow linear;
animation-timeline: scroll();
}The animation shorthand resets animation-timeline, so the timeline must be declared after it.
animation-timeline before animation, so the shorthand resets it and the animation runs on time.animation-timeline: scroll() or view() instead of a JavaScript scroll listener.animation-timeline is declared after the animation shorthand, which resets it.@supports (animation-timeline: scroll()), and content stays visible without it.@media (prefers-reduced-motion: reduce).Yes. Set scroll-timeline-name, like '--page', on the scroller and use animation-timeline: --page on an animated descendant.
The declaration is ignored and the animation runs on normal time, so wrap the effect in @supports.