پیش‌نمایش زنده
کد HTML
<div class="loop cubes">
  <div class="item cubes"></div>
  <div class="item cubes"></div>
  <div class="item cubes"></div>
  <div class="item cubes"></div>
  <div class="item cubes"></div>
  <div class="item cubes"></div>
</div>
کد CSS
.cubes {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
}

.loop {
  transform: rotateX(-38deg) rotateY(-46deg) translateZ(1.5625em);
}

@keyframes s {
  to {
    transform: scale3d(0.2, 0.2, 0.2);
  }
}

.item {
  margin: -1.5625em;
  width: 3.125em;
  height: 3.125em;
  transform-origin: 50% 50% -1.5625em;
  box-shadow: 0 0 0.125em currentColor;
  background: currentColor;
  animation: s 0.6s cubic-bezier(0.45, 0.03, 0.51, 0.95) infinite alternate;
}

.item:before,
.item:after {
  position: absolute;
  width: inherit;
  height: inherit;
  transform-origin: 0 100%;
  box-shadow: inherit;
  background: currentColor;
  content: "";
}

.item:before {
  bottom: 100%;
  transform: rotateX(90deg);
}

.item:after {
  left: 100%;
  transform: rotateY(90deg);
}

.item:nth-child(1) {
  margin-top: 6.25em;
  color: #15cae6;
  animation-delay: -1.2s;
}

.item:nth-child(1):before {
  color: #15cae6;
}

.item:nth-child(1):after {
  color: #15cae6;
}

.item:nth-child(2) {
  margin-top: 3.125em;
  color: #1550e6;
  animation-delay: -1s;
}

.item:nth-child(2):before {
  color: #1550e6;
}

.item:nth-child(2):after {
  color: #1550e6;
}

.item:nth-child(3) {
  margin-top: 0em;
  color: #0c25c3;
  animation-delay: -0.8s;
}

.item:nth-child(3):before {
  color: #0c25c3;
}

.item:nth-child(3):after {
  color: #0c25c3;
}

.item:nth-child(4) {
  margin-top: -3.125em;
  color: #2d1fe9;
  animation-delay: -0.6s;
}

.item:nth-child(4):before {
  color: #2d1fe9;
}

.item:nth-child(4):after {
  color: #2d1fe9;
}

.item:nth-child(5) {
  margin-top: -6.25em;
  color: #ae0cd6;
  animation-delay: -0.4s;
}

.item:nth-child(5):before {
  color: #ae0cd6;
}

.item:nth-child(5):after {
  color: #ae0cd6;
}

.item:nth-child(6) {
  margin-top: -9.375em;
  color: #7e0963;
  animation-delay: -0.2s;
}

.item:nth-child(6):before {
  color: #7e0963;
}

.item:nth-child(6):after {
  color: #7e0963;
}
نوع: loader
تاریخ ایجاد: 2026/06/06
آخرین بروزرسانی: 2026/06/06