<div class="loading">
  <span></span>
  <span></span>
  <span></span>
</div>
.loading {
  margin: 1rem 2rem;
  display: flex;
  justify-content: center;
  gap: 10px;
}

span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  animation-name: blinking;
  animation-duration: 1.5s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

span:nth-child(1) {
  background-color: violet;
  animation-delay: 0.3s;
}
span:nth-child(2) {
  background-color: rgb(235, 86, 235);
  animation-delay: 0.4s;
}
span:nth-child(3) {
  background-color: rgb(201, 32, 201);
  animation-delay: 0.5s;
}

@keyframes blinking {
  0% {
    opacity: 0.5;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.