translateX(-50%)
A marquee that never jumps
FigmaAstroVitePlaywright
CaveatThe track holds the list twice and travels exactly -50%. Any other distance, or a single copy, and the loop visibly snaps back at the seam.
FallbackMark the second copy aria-hidden — it is decoration, and a screen reader should not read the same list twice. Stop the animation under prefers-reduced-motion.
.track {
display: flex;
width: max-content; /* the list, twice */
animation: slide 14s linear infinite;
}
@keyframes slide {
to { transform: translateX(-50%); }
}
Published