JSFiddle - React, Tailwind, and code Playground

by brigand

HTML

<div class="thing">
  <div class="dot"></div>
    <div class="dot"></div>
      <div class="dot"></div>
</div>

CSS

.thing {
  margin: 6em auto;
  width: 4em;
  height: 4em;
  position: relative;
  background: limegreen;
  border-radius: 25%;
}


.dot {
  position: absolute;
  top: 0;
  left: 0;

  width: 1em;
  height: 1em;
  background: hotpink;
  border-radius: 50%;
  animation-duration: 2s;
  animation-name: anim-spin;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transform-origin: 300% 300%;
}

.dot + .dot {
  opacity: 0.5;
  animation-delay: 0.1s;
}

.dot + .dot + .dot {
  opacity: 0.3;
  animation-delay: 0.2s;
}

@keyframes anim-spin {
  0% {
    transform: translate(-100%, -100%) rotate(0deg);
  }
  50% {
        transform: translate(-100%, -100%) rotate(180deg);
  }
  100% {
    transform: translate(-100%, -100%) rotate(359deg);
  }
}