Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzo-gasperoni/3cd27713b6dd82bce816 to your computer and use it in GitHub Desktop.
Save lorenzo-gasperoni/3cd27713b6dd82bce816 to your computer and use it in GitHub Desktop.
/* Use max-height in the transformation and not height.
/* And set a value on max-height to something bigger than your box will ever get. */
#menu #list {
max-height: 0;
transition: max-height 0.15s ease-out;
overflow: hidden;
background: #d5d5d5;
}
#menu:hover #list {
max-height: 500px;
transition: max-height 0.15s ease-in;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment