JSFiddle - React, Tailwind, and code Playground

by jdarville

HTML

<div class="container">
  <span class="dots"></span>
  <span class="dots"></span>
  <span class="dots"></span>
  <span class="dots"></span>
  <span class="dots"></span>
  <span class="dots"></span>
  <span class="dots"></span>
  <span class="dots"></span>
  <span class="dots"></span>
  <span class="dots"></span>
</div>

CSS

*, *:before, *:after {
  margin: 0;
  padding: 0;
  -moz-box-sizing: border-box;
  box-sizing: border-box; }

body {
  text-align: center;
  line-height: 100vh; }

.container {
  display: inline-block; }

.dots {
  display: inline-block;
  position: relative; }
  .dots:not(:last-child) {
    margin-right: 9px; }
  .dots:before, .dots:after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    position: absolute; }
  .dots:nth-child(1):before {
    -webkit-transform: translateY(-200%);
    transform: translateY(-200%);
    -webkit-animation: animBefore 1s linear infinite;
    animation: animBefore 1s linear infinite;
    -webkit-animation-delay: -0.9s;
    animation-delay: -0.9s;
    background-color: red; }
  .dots:nth-child(1):after {
    -webkit-transform: translateY(200%);
    transform: translateY(200%);
    -webkit-animation: animAfter 1s linear infinite;
    animation: animAfter 1s linear infinite;
    -webkit-animation-delay: -0.9s;
    animation-delay: -0.9s;
    background-color: #777777; }
  .dots:nth-child(2):before {
    -webkit-transform: translateY(-200%);
    transform: translateY(-200%);
    -webkit-animation: animBefore 1s linear infinite;
    animation: animBefore 1s linear infinite;
    -webkit-animation-delay: -1.8s;
    animation-delay: -1.8s;
    background-color: red; }
  .dots:nth-child(2):after {
    -webkit-transform: translateY(200%);
    transform: translateY(200%);
    -webkit-animation: animAfter 1s linear infinite;
    animation: animAfter 1s linear infinite;
    -webkit-animation-delay: -1.8s;
    animation-delay: -1.8s;
    background-color: #777777; }
  .dots:nth-child(3):before {
    -webkit-transform: translateY(-200%);
    transform: translateY(-200%);
    -webkit-animation: animBefore 1s linear infinite;
    animation: animBefore 1s linear infinite;
    -webkit-animation-delay: -2.7s;
    animation-delay: -2.7s;
    background-color: red; }
  .dots:nth-child(3):after {
   ...