HTML CSS examples for CSS Widget:Menu Dropdown
CSS3 drop-down navigation
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #nav li {<!-- w ww . j a va2 s .co m--> display:inline-block; width:141px; background:beige; border-bottom:2px solid Chartreuse; position:relative; height:43px; line-height:43px; } #nav li ul { position:absolute; left:0; top:44px; width:141px; height:0; overflow:hidden; -webkit-transition:height .26s linear; -moz-transition:height .26s linear; -o-transition:height .26s linear; -ms-transition:height .26s linear; transition:height .26s linear; } #nav li:hover ul.sub1 { height:43px; } #nav li:hover ul.sub2 { height:85px; } #nav li:hover ul.sub3 { height:127px; } </style> </head> <body> <ul id="nav"> <li> <a href="#">Lorem </a> <ul class="sub1"> <li> <a href="#">Lorem ip</a> </li> </ul> </li> <li> <a href="#">Lorem </a> <ul class="sub2"> <li> <a href="#">Lorem ip</a> </li> <li> <a href="#">Lorem ip</a> </li> </ul> </li> <li> <a href="#">Lorem </a> <ul class="sub3"> <li> <a href="#">Lorem ip</a> </li> <li> <a href="#">Lorem ip</a> </li> <li> <a href="#">Lorem ip</a> </li> </ul> </li> </ul> </body> </html>