Created
March 31, 2021 12:34
-
-
Save Akifcan/9eeff14490bb284127fbf4d4d9f569ac to your computer and use it in GitHub Desktop.
medium carousel article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.slider .slide-item { | |
cursor: grabbing; | |
scroll-snap-align: start; | |
flex-shrink: 0; /* We don't want to fit divs to parent element. So we'll use flex-shrink: 0 */ | |
background-color: red; | |
width: 100%; | |
display: grid; | |
place-items: center; | |
font-size: 5rem; | |
} | |
.slide-item:nth-of-type(1) { | |
background: linear-gradient( | |
to right, | |
#000000, | |
#e74c3c | |
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ | |
} | |
.slide-item:nth-of-type(2) { | |
background: linear-gradient( | |
to right, | |
#485563, | |
#29323c | |
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ | |
} | |
.slide-item:nth-of-type(3) { | |
background: linear-gradient( | |
to right, | |
#556270, | |
#ff6b6b | |
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment