پیش‌نمایش زنده
کد HTML
<div class="container">
  <div class="ball"></div>
  <div class="ball"></div>
  <div class="ball"></div>
  <div class="ball"></div>
  <div class="ball"></div>
  <div class="ball"></div>
  <div class="ball"></div>
</div>
کد CSS
.container {
  width: 200px;
  height: 150px;
  margin: 0 auto;
}

.ball {
  width: 10px;
  height: 10px;
  margin: 10px auto;
  border-radius: 50px;
}

.ball:nth-child(1) {
  background: #ffffff;
  animation: right2 1s infinite ease-in-out;
}

.ball:nth-child(2) {
  background: #ffffff;
  animation: left2 1.1s infinite ease-in-out;
}

.ball:nth-child(3) {
  background: #ffffff;
  animation: right2 1.05s infinite ease-in-out;
}

.ball:nth-child(4) {
  background: #ffffff;
  animation: left2 1.15s infinite ease-in-out;
}

.ball:nth-child(5) {
  background: #ffffff;
  animation: right2 1.1s infinite ease-in-out;
}

.ball:nth-child(6) {
  background: #ffffff;
  animation: left2 1.05s infinite ease-in-out;
}

.ball:nth-child(7) {
  background: #ffffff;
  animation: right2 1s infinite ease-in-out;
}

@keyframes right2 {
  0% {
    transform: translate(-15px);
  }

  50% {
    transform: translate(15px);
  }

  100% {
    transform: translate(-15px);
  }
}

@keyframes left2 {
  0% {
    transform: translate(15px);
  }

  50% {
    transform: translate(-15px);
  }

  100% {
    transform: translate(15px);
  }
}
نوع: loader
تاریخ ایجاد: 2026/06/06
آخرین بروزرسانی: 2026/06/06