
CSS-Tricks · 5 min readCSS & layout
CSS timeline-scope: One Scroll, Multiple Carousels
Learn how to synchronize multiple carousels using CSS‑only scroll timelines and timeline‑scope. The guide shows how to create a primary scrollable carousel, a secondary non‑scrolling carousel, and link their animations via a shared scroll timeline, enabling coordinated slide transitions.
- Define a scroll-timeline on the primary carousel and link it with animation-timeline on the secondary slides.
- Use timeline-scope on a common ancestor to share the timeline between elements.
- Apply sibling-count() in keyframes to calculate slide translation based on sibling count.