JSFiddle - React, Tailwind, and code Playground

by Mehmet Yener

HTML

<div class="coverflow">
  <img src="http://placehold.it/200x200&text=1" class="coverflow-item">
  <img src="http://placehold.it/200x200&text=2" class="coverflow-item">
  <img src="http://placehold.it/200x200&text=3" class="coverflow-item">
  <img src="http://placehold.it/200x200&text=4" class="coverflow-item">
  <img src="http://placehold.it/200x200&text=5" class="coverflow-item">
  <img src="http://placehold.it/200x200&text=6" class="coverflow-item">
  <img src="http://placehold.it/200x200&text=7" class="coverflow-item">
  <img src="http://placehold.it/200x200&text=8" class="coverflow-item">
</div>

CSS

body {
  padding: 4em 0;
  text-align: center;
  background: #f1f1f1;
}

.coverflow {
  width: 200px;
  height: 200px;
  display: inline-block;
  position: relative;
}
.coverflow > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
  -webkit-animation: coverflow 8s ease both infinite;
          animation: coverflow 8s ease both infinite;
}
.coverflow :nth-child(2) {
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
}
.coverflow :nth-child(3) {
  -webkit-animation-delay: 2s;
          animation-delay: 2s;
}
.coverflow :nth-child(4) {
  -webkit-animation-delay: 3s;
          animation-delay: 3s;
}
.coverflow :nth-child(5) {
  -webkit-animation-delay: 4s;
          animation-delay: 4s;
}
.coverflow :nth-child(6) {
  -webkit-animation-delay: 5s;
          animation-delay: 5s;
}
.coverflow :nth-child(7) {
  -webkit-animation-delay: 6s;
          animation-delay: 6s;
}
.coverflow :nth-child(8) {
  -webkit-animation-delay: 7s;
          animation-delay: 7s;
}

.coverflow-item {
  border-radius: 50%;
  border: 5px solid white;
}

@-webkit-keyframes coverflow {
  0%, 5% {
    opacity: 0;
    -webkit-transform: translate3d(190px, 0, 0) scale(0.6);
            transform: translate3d(190px, 0, 0) scale(0.6);
  }
  12.5%, 17.5% {
    opacity: 0.2;
    -webkit-transform: translate3d(170px, 0, 0) scale(0.6);
            transform: translate3d(170px, 0, 0) scale(0.6);
  }
  25%, 30% {
    opacity: 1;
    -webkit-transform: translate3d(0, 0, 0) scale(1);
            transform: translate3d(0, 0, 0) scale(1);
  }
  37.5%, 42.5% {
    opacity: 0.2;
    -webkit-transform: translate3d(-170px, 0, 0) scale(0.6);
            transform: translate3d(-170px, 0, 0) scale(0.6);
  }
  0%, 50% {
    opacity: 0;
    -webkit-transform: translate3d(-190px, 0, 0) scale(0.6);
            transform: translate3d(-190px, 0, 0) scale(0.6);
  }
  100% {
    opacity: 0;
    -webkit-transform: translate3d(-190px, 0, 0) scale(0.6);
            transform:...