3

li:hover display:block ul which is li's children .how to make transition?

コード:

<li class="level0 nav-2 level-top parent">
    <a href="#" class="level-top"><span>Womens</span></a>
    <ul class="level0"><li class="level1 nav-2-1 first">
        <a href="#"><span>Running</span></a></li>
        <li class="level1 nav-2-2"><a href="#"><span>Skateboarding</span></a></li>
        <li class="level1 nav-2-3 last"><a href="#"><span>Casual</span></a></li>
    </ul>
</li>
4

1 に答える 1

2

CSS トランジション

li ul {
    opacity: 0;
    -webkit-transition: all 1s ease-in-out;
    -moz-transition: all 1s ease-in-out;
    -ms-transition: all 1s ease-in-out;
    -o-transition: all 1s ease-in-out;
    transition: all 1s ease-in-out;
}

li:hover ul {
    opacity: 1;
    -webkit-transition: all 1s ease-in-out;
    -moz-transition: all 1s ease-in-out;
    -ms-transition: all 1s ease-in-out;
    -o-transition: all 1s ease-in-out;
    transition: all 1s ease-in-out;
}​

フィドル: http://jsfiddle.net/gezmy/

于 2012-10-13T03:01:24.930 に答える