# Infinite Marquee

> A seamless, endlessly scrolling row with faded edges. Great for logo strips.

- Category: [CSS Effects](https://copy-css.com/category/effects)
- Tags: marquee, scroll, ticker, logos, loop, animation
- Live preview: https://copy-css.com/snippets/infinite-marquee
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="marquee">
  <div class="marquee-track">
    <span>HTML</span><span>CSS</span><span>Design</span><span>Motion</span>
    <span aria-hidden="true">HTML</span><span aria-hidden="true">CSS</span><span aria-hidden="true">Design</span><span aria-hidden="true">Motion</span>
  </div>
</div>
```

## CSS

```css
/* The track holds the items twice so the loop is seamless */
.marquee {
  width: 260px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

.marquee-track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee-scroll 10s linear infinite;
}

.marquee-track span {
  padding: 8px 16px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font: 600 14px system-ui, sans-serif;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  to { transform: translateX(calc(-50% - 6px)); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}
```

## Notes

- This CSS Infinite Marquee is 36 lines of pure CSS (0.8 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms, linear gradients and masks.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
