Created
February 26, 2014 23:11
-
-
Save therebelrobot/9240793 to your computer and use it in GitHub Desktop.
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
/** | |
* transition using width or height auto | |
*/ | |
ul,li { | |
display: block; | |
margin: 0; | |
padding: 0; | |
width: 250px; | |
} | |
li { | |
border-bottom: 1px solid lightgrey; | |
} | |
li > ul { | |
max-height: 0; | |
overflow: hidden; | |
text-indent: .5em; | |
transition: max-height 1s; | |
} | |
li:hover > ul { | |
max-height: 1000px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment