body {
margin: 0;
padding: 0;
background: #1d1d1d;
}
ul {
  margin: 0;
  padding: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  overflow: hidden;
}
ul li {
  position: relative;
  list-style: none;
  width: 150px;
  height: 150px;
  border: 1px solid #262626;
  background: #262626;
  box-shadow: 0 0 15px rgba(0,0,0,1);
}
ul li:nth-child(even):before {
  content: attr(data-attr);
  text-align: center;
  line-height: 150px;
  font-size: 80px;
  font-family: sans-serif;
  width: 100%;
  height: 100%;
  animation: animateEven 1.5s linear infinite;
  box-shadow: 0 0 15px rgba(0,0,0,1);
  display: inline-block;
  background: #ff0;
  position: absolute;
  top: 0;
  left: 0;
}
@keyframes animateEven {
  0% {
    transform: scale(1);
    top: -100%;
  }
  30% {
    transform: scale(.5);
    top: 0%;
  }
  70% {
    transform: scale(.5);
    top: 0%;
  }
  100% {
    transform: scale(.2);
    top: 100%;
  }
}
ul li:nth-child(1)::before {
  animation-delay: 0s
}
ul li:nth-child(2)::before {
  animation-delay: .1s
}
ul li:nth-child(3)::before {
  animation-delay: .2s
}
ul li:nth-child(4)::before {
  animation-delay: .3s
}
ul li:nth-child(5)::before {
  animation-delay: .4s
}
ul li:nth-child(6)::before {
  animation-delay: .5s
}
ul li:nth-child(7)::before {
  animation-delay: .7s
}
ul li:nth-child(Odd):before {
  content: attr(data-attr);
  text-align: center;
  line-height: 150px;
  font-size: 80px;
  font-family: sans-serif;
  width: 100%;
  height: 100%;
  animation: animateOdd 1.5s linear infinite;
  box-shadow: 0 0 15px rgba(0,0,0,1);
  display: inline-block;
  background: #ff0;
  position: absolute;
  top: 0;
  left: 0;
}
@keyframes animateOdd {
  0% {
    transform: scale(1);
    top: 100%;
  }
  30% {
    transform: scale(.5);
    top: 0%;
  }
  70% {
    transform: scale(.5);
    top: 0%;
  }
  100% {
    transform: scale(.2);
    top: -100%;
  }
}
ul li:nth-child(1)::before {
  animation-delay: 0s
}
ul li:nth-child(2)::before {
  animation-delay: .1s
}
ul li:nth-child(3)::before {
  animation-delay: .2s
}
ul li:nth-child(4)::before {
  animation-delay: .3s
}
ul li:nth-child(5)::before {
  animation-delay: .4s
}
ul li:nth-child(6)::before {
  animation-delay: .5s
}
ul li:nth-child(7)::before {
  animation-delay: .7s
}
