Created
March 30, 2018 13:37
-
-
Save taylorbryant/228c17c80abfd25a41eb7230cc8d5d51 to your computer and use it in GitHub Desktop.
Make Slick.js sliders load gracefully
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
/* | |
* Make Slick.js sliders load gracefully | |
*/ | |
.graceful { | |
visibility: hidden; | |
-webkit-transition: opacity 1s; | |
transition: opacity 1s; | |
opacity: 0; | |
} | |
.graceful.slick-initialized { | |
visibility: visible; | |
opacity: 1; | |
} | |
.graceful .slick-slide { | |
display: none; | |
} | |
.graceful .slick-slide:first-child { | |
display: block; | |
visibility: hidden; | |
} | |
.graceful.slick-initialized .slick-slide { | |
display: block !important; | |
visibility: visible !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment