CSS Drop Down Menu Fading - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Dropdown

Description

CSS Drop Down Menu Fading

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#header1 {<!--from   w  w  w. j ava  2  s  . c om-->
   background:Chartreuse;
   background-color:yellow;
   font-family:Arial, Helvetica, sans-serif;
   font-size:15px;
   font-weight:bold;
   color:blue;
}

ul#horiznav, #horiznav ul {
   margin:0;
   padding:0;
   list-style-type:none;
   height:33px;
   text-align:center
}

#horiznav li {
   display:inline-block;
   width:151px;
   z-index:2;
   position:relative;
}

#horiznav li a {
   display:block;
   width:151px;
   line-height:31px;
   text-align:center;
   color:pink;
   text-decoration:none;
   background-color:OrangeRed;
   border:2px solid grey;
}

#horiznav li a:hover {
   -webkit-transition:All 0.6s ease;
   -moz-transition:All 0.6s ease;
   -o-transition:All 0.6s ease;
   color:BlueViolet;
}

#horiznav li ul {
   -webkit-transition:visibility 0.6s ease, opacity 0.6s ease;
   -moz-transition:visibility 0.6s ease, opacity 0.6s ease;
   -o-transition:visibility 0.6s ease, opacity 0.6s ease;
   transition:visibility 0.6s ease, opacity 0.6s ease;
   visibility:hidden;
   opacity:0;
   position:absolute;
   left:0;
   top:33px;
}

#horiznav li:hover ul {
   visibility:visible;
   opacity:2;
}

#horiznav li ul a {
   background-color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <div id="header1"> 
   <table width="100%" height="60px" border="0"> 
    <tbody> 
     <tr> 
      <td align="center"> 
       <ul id="horiznav"> 
        <li> <a href="#" class="class2">Lore</a> </li> 
        <li> <a href="#" class="class2">Lorem ipsu</a> </li> 
        <li> <a href="#" target="_blank" class="class2">Lorem ip</a> </li> 
        <li> <a href="#" class="class2">Lorem</a> 
         <ul> 
          <li> <a href="#" class="class2">Lorem ipsum dolor s</a> </li> 
          <li> <a href="#" class="class2">Lorem ip</a> </li> 
          <li> <a href="#" class="class2">Lorem i</a> </li> 
          <li> <a href="#" class="class2">Lorem ipsum dolor </a> </li> 
         </ul> </li> 
        <li> <a href="#" class="class2">Lorem ipsum</a> </li> 
        <li> <a href="#" class="class2">Lorem ipsum do</a> </li> 
       </ul> </td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials