这是一种无限滚动动画,通常用于循环显示合作伙伴公司徽标列表。

预览

LOGO 1LOGO 2LOGO 3LOGO 4LOGO 5
LOGO 1LOGO 2LOGO 3LOGO 4LOGO 5

用例和功能

设计和用户体验(Design & UX)的要点

如何定制(定制指南)

实现代码(Implementation)

<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>