Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The scroll-timeline-name
CSS property is used to define a named timeline that drives the progress of the scrollbar in a container. The name is then referenced in an animation-timeline
declaration to indicate the container's element that is used to drive the progress of the animation through the scrolling action.
By default, the scrollbar in the block
direction provides the timeline (this is the vertical scrollbar in left-to-right writing mode). The scrollbar axis can be set by applying scroll-timeline-axis
on the same element as the scroll-timeline-name
.
Note: If the element does not overflow its container in the axis dimension or if the overflow is hidden or clipped, no timeline will be created.
The scroll-timeline-name
(and scroll-timeline-axis
) property can also be set by using the scroll-timeline
shorthand property.