پیش‌نمایش زنده
کد HTML
<div class="container">
  <div class="loader" style="--clr:#01e100;--i:1;"></div>
  <div class="loader" style="--clr:#f50076;--i:2;"></div>
  <div class="loader" style="--clr:#00e6fd;--i:3;"></div>
</div>
کد CSS
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.loader {
  position: relative;
  width: 150px;
  height: 150px;
  background: rgba(45, 45, 45, 1);
  overflow: hidden;
  transform: rotate(calc(90deg * var(--i)));
}

.loader::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(var(--clr), transparent);
  animation: animate 1.5s linear infinite;
}

.loader::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: rgba(45, 45, 45, 0.9);
}

@keyframes animate {
  0% {
    transform: translate(-150px, -150px);
  }
  25% {
    transform: translate(0px, -150px);
  }
  50% {
    transform: translate(0px, 0px);
  }
  75% {
    transform: translate(-150px, 0px);
  }
  100% {
    transform: translate(-150px, -150px);
  }
}
نوع: card
تاریخ ایجاد: 2026/06/06
آخرین بروزرسانی: 2026/06/06