Click to show menu dropdown - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Dropdown

Description

Click to show menu dropdown

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">
li {<!--from  w w w.  j a v a 2  s  .c  o m-->
   list-style-type:none;
}

.responsive-menu {
   display:block;
   background-color:Chartreuse;
   color:yellow;
   text-align:center;
   padding:11px;
   font-size:201%;
}

.responsive-menu ul li ul li {
   padding:11px;
   border-bottom:2px solid blue;
   border-top:2px solid pink;
}

.responsive-menu ul li ul {
   display:none;
   font-size:61%;
   padding-top:31px;
}

#trigger {
   display:none;
}

#trigger:checked + .responsive-menu ul li:hover ul {
   display:block;
}
</style> 
 </head> 
 <body> 
  <input type="checkbox" id="trigger"> 
  <div class="responsive-menu"> 
   <ul> 
    <li> <label for="trigger">Lore</label> 
     <ul> 
      <li>Lorem</li> 
      <li>Lorem </li> 
      <li>Lorem </li> 
      <li>Lorem</li> 
     </ul> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials