Last active
January 25, 2017 20:21
-
-
Save ozzyrod/b1fa7e68a27cbb53bc09c1b3b497beb0 to your computer and use it in GitHub Desktop.
max-height transitions
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
.show-hide-content { | |
height: auto; /* this should be set already, but just in case it isn't, it's necessary to have the height set to auto for this to work */ | |
max-height: 180px; /* Set this to whatever you want the height to start off as */ | |
overflow: hidden; | |
transition: max-height 0.2s ease-in-out; | |
} | |
.show-hide-content.full { /* The class "full" should be added with JS */ | |
max-height: 100vh; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment