JSFiddle - React, Tailwind, and code Playground

by Chris LaFrombois

HTML

<div>
  <span>W</span>
  <span>E</span>
  <span>L</span>
  <span>C</span>
  <span>O</span>
  <span>M</span>
  <span>E</span>
</div>

CSS

div {
  font-family: "Comic Sans MS", sans-serif;
  margin: 200px auto 0;
  width: 90%;
  display: flex;
  justify-content: center;
}

span {
  color: white;
  font-size: 4vw;
  padding: 2% 3%;
  margin: 5px;
  border-radius: 10px;
  display: inline-block;
  animation: move 0.8s infinite linear;
}

@keyframes move {
  0% {
    transform: translateY(0px);
    opacity: 1.0;
  }
  50% {
    transform: translateY(-50px);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0px);
    opacity: 1.0;
  }
}

span:nth-child(1) {
  animation-delay: 0.1s;
  background-color: red;
  box-shadow: 5px 5px 0 black;
}

span:nth-child(2) {
  animation-delay: 0.2s;
  background-color: blue;
  box-shadow: 5px 5px 0 black;
}

span:nth-child(3) {
  animation-delay: 0.3s;
  background-color: green;
  box-shadow: 5px 5px 0 black;
}

span:nth-child(4) {
  animation-delay: 0.4s;
  background-color: orangered;
  box-shadow: 5px 5px 0 black;
}

span:nth-child(5) {
  animation-delay: 0.5s;
  background-color: springgreen;
  box-shadow: 5px 5px 0 black;
}

span:nth-child(6) {
  animation-delay: 0.6s;
  background-color: blueviolet;
  box-shadow: 5px 5px 0 black;
}

span:nth-child(7) {
  animation-delay: 0.7s;
  background-color: purple;
  box-shadow: 5px 5px 0 black;
}