Coder Wrap provides free to use snippets Coder Wrap provides free to use snippets

Back to Sliders
Preview Source Code
Download
HTML
CSS
.container-slides {
  display: flex;
  justify-content: center;
overflow:hidden;
}

.thumbnails {
  display: flex;
  flex-direction: column;
  line-height: 0;
  list-style: none;
  padding: 0px;
  margin: 0px;
}
.thumbnails li {
  flex: auto;
  list-style: none;
  padding: 0px;
  margin: 0px;
}
.thumbnails a {
  display: block;
}
.thumbnails img {
  width: 30vmin;
  height: 20vmin;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
}

.slides {
  overflow: hidden;
  width: 75vmin;
  height: 100vmin;
  list-style: none;
  padding: 0px;
  margin: 0px;
}
.slides li {
  width: 75vmin;
  height: 100vmin;
  position: absolute;
  z-index: 1;
  list-style: none;
  padding: 0px;
  margin: 0px;
}
.slides img {
  max-width: 100%;
  height: 100vmin;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: top;
     object-position: top;
}

.slides li:target {
  z-index: 3;
  -webkit-animation: slide 1s 1;
}

.slides li:not(:target) {
  -webkit-animation: hidden 1s 1;
}

@-webkit-keyframes slide {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0%);
  }
}

@keyframes slide {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0%);
  }
}
@-webkit-keyframes hidden {
  0% {
    z-index: 2;
  }
  100% {
    z-index: 2;
  }
}
@keyframes hidden {
  0% {
    z-index: 2;
  }
  100% {
    z-index: 2;
  }
}

Related Snippets

Leave a comment

Your email address will not be published. Required fields are marked *