โœฆ StealThis .dev

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.

Open in Lab
css keyframes animation vanilla-js
Targets: HTML

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--reverse class for RTL scroll
  • Speed control โ€” --marquee-duration CSS variable
  • Gap control โ€” --marquee-gap CSS variable
  • Respects prefers-reduced-motion

When to use it

  • Logo / partner strips
  • Live news or status tickers
  • Announcement banners