
.carousel {
  width: 100%;
  height: 100vh;
  box-sizing: border-box;
}

.viewport {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: black;
}

.slide-container {
  width: 100%;
  height: 100%;
  position: absolute;
}

.slide-container > div {
  width: 100%;
  height: 100%;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  animation-name: swipe;
  animation-duration: 15s; /* 5 * number of slides. */
  animation-iteration-count: infinite;
  animation-timing-function: cubic-bezier(1, 0, 0, 1);
  z-index: 1;
  position: absolute;
  background-color: white;
}

.slide-1 {
  background: url(https://picsum.photos/3200/2300/?random) no-repeat center center fixed;
  animation-delay: 5s;
}

.slide-2 {
  background: url(https://picsum.photos/2200/2200/?random) no-repeat center center fixed;
  animation-delay: 10s;
}

.slide-3 {
  background: url(https://picsum.photos/2200/1800/?random) no-repeat center center fixed;
  animation-delay: 15s;
}
 @keyframes 
swipe {  0% {
 z-index: 1;
 will-change: width;
}
 15% {
 width: 0;
 visibility: hidden;
}
 30% {
 z-index: 0;
 width: 100%;
}
 65.9% { /* (Numer of slides * 10) + 36 - 0.1. */
 z-index: 0;
 visibility: hidden;
}
 66% { /* (Numer of slides * 10) + 36. */
 visibility: visible;
}
}
