Created
December 28, 2015 14:23
-
-
Save pawelgur/a2cc60d7b9e9c3cbbcb1 to your computer and use it in GitHub Desktop.
Element fade in and out with pure css
This file contains 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
/* | |
This will show/hide element with fade transition. Hidden element won't overlap any other. | |
*/ | |
.fade-in-out { | |
height: 0; | |
opacity: 0; | |
transition: opacity 300ms, height 10ms 300ms; /* delay height transition until opacity is done */ | |
&.hover{ | |
height: 100%; | |
opacity: 1; | |
transition: opacity 300ms; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment