Skip to content

Instantly share code, notes, and snippets.

@rienheuver
Created August 24, 2019 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rienheuver/df5ff228c6883f96f47f94a6d6c49a2d to your computer and use it in GitHub Desktop.
Save rienheuver/df5ff228c6883f96f47f94a6d6c49a2d to your computer and use it in GitHub Desktop.
/*
Author: Rien Heuver, rienheuver@gmail.com
Clean Slider, this is all that is needed
Documentation on https://github.com/rienheuver/clean-slider
*/
.slider {
display: grid;
grid-template-columns: 1fr;
overflow: hidden;
width: 100%;
perspective: 400px;
}
.slide {
grid-column: 1/2;
grid-row: 1/2;
transition: transform 300ms ease-in-out;
}
.slide-next {
transform: translateX(100%);
}
.slide-prev {
transform: translateX(-100%);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment