Trying to create an animated dropdown menu using CSS animation, without any JS. Thought I've been barking up the right tree but can't see where I'm going wrong, for this simplified menu item...
<div class="menu">Menu Item
<ul>
<li>Dropdown 1</li>
<li>Dropdown 2</li>
<li>Dropdown 3</li>
<li>Dropdown 4</li>
<li>Dropdown 5</li>
</ul>
</div>
And the following CSS;
.menu ul {
height: 0px;
overflow: hidden;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
}
.menu:hover ul {
height: auto;
}
Thought that should successfully result in a scroll down of the div, but it just keeps appearing. Any thoughts? Cheers