Transition height: 0; to height: auto; using CSS?

<div id="menu">
    <a>hover me</a>
    <ul id="list">
        <!-- Create a bunch, or not a bunch, of li's to see the timing. -->
#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.25s ease-in;
add comment
Suggest a different solution or add another example