Se trata de una animación de desplazamiento infinito que se utiliza a menudo para mostrar una lista de logotipos de empresas asociadas en un bucle.
animation, el desplazamiento es más fluido y tiene mejor rendimiento que JavaScript.animation-play-state: paused).20s en CSS animation: marquee 20s linear infinite;.<div class="w-full overflow-hidden bg-white dark:bg-zinc-950 py-10">
<style>
@keyframes marquee {
0% { transform: translateX(0); }
100% { transform: translateX(-50%); }
}
.animate-marquee {
animation: marquee 20s linear infinite;
}
.animate-marquee:hover {
animation-play-state: paused;
}
</style>
<div class="flex w-[200%] animate-marquee gap-8 items-center">
<!-- First set -->
<div class="flex-1 flex justify-around items-center font-bold text-2xl text-gray-300 dark:text-zinc-700">
<span>LOGO 1</span>
<span>LOGO 2</span>
<span>LOGO 3</span>
<span>LOGO 4</span>
<span>LOGO 5</span>
</div>
<!-- Duplicate set for infinite effect -->
<div class="flex-1 flex justify-around items-center font-bold text-2xl text-gray-300 dark:text-zinc-700">
<span>LOGO 1</span>
<span>LOGO 2</span>
<span>LOGO 3</span>
<span>LOGO 4</span>
<span>LOGO 5</span>
</div>
</div>
</div>