Infinite Marquee / Ticker
A smooth infinite scrolling marquee/ticker built with CSS animation. Content is duplicated to create a seamless loop. Pauses on hover, respects reduced-motion.
Code
Infinite Marquee / Ticker
A performant infinite scrolling ticker using CSS @keyframes and translateX. Content items are duplicated in the DOM to create a seamless loop โ no JavaScript animation loop required.
How it works
The marquee track holds two identical sets of items side by side. The animation translates the track by -50% (one full copy width), then loops. Since both copies are identical, the transition is seamless.
[ A B C D E ] [ A B C D E ]
โโโ translateX(-50%) โโโโโโโ
Features
- Pause on hover โ
animation-play-state: paused - Reverse direction โ add
.marquee--reverseclass for RTL scroll - Speed control โ
--marquee-durationCSS variable - Gap control โ
--marquee-gapCSS variable - Respects
prefers-reduced-motion
When to use it
- Logo / partner strips
- Live news or status tickers
- Announcement banners