Expandable menu items, rotation and translate - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Menu Item

Description

Expandable menu items, rotation and translate

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">
.flyOut {<!--   ww w. j a  v a2  s.  com-->
   width:100px;
   height:301px;
   background:black;
   position:relative;
   z-index:2;
}

.flyOut ul {
   position:absolute;
   top:51px;
}

.flyOut li {
   width:121px;
   line-height:33px;
   margin:9px 0;
   padding-left:33px;
   background:black;
   color:Chartreuse;
   text-align:left;
   z-index:0;
   -webkit-transform:rotate(-21deg);
   -moz-transform:rotate(-21deg);
   -o-transform:rotate(-21deg);
   -ms-transform:rotate(-21deg);
   transform:rotate(-21deg);
   border-radius:0 3px 3px 0;
   -webkit-transition:501ms;
   -moz-transition:501ms;
   -o-transition:501ms;
   -ms-transition:501ms;
   transition:501ms;
}

.flyOut li .icon {
   float:right;
   margin:8px 9px 0 0;
}

.flyOut li:hover {
   -webkit-transform:rotate(-21deg) translate(91px, 0);
   -moz-transform:rotate(-21deg) translate(91px, 0);
   -o-transform:rotate(-21deg) translate(91px, 0);
   -ms-transform:rotate(-21deg) translate(91px, 0);
   transform:rotate(-21deg) translate(91px, 0);
}
</style> 
 </head> 
 <body> 
  <div class="flyOut"> 
   <ul> 
    <li>Lorem ip<img class="icon" src="https://www.java2s.com/style/demo/Firefox.png"> </li> 
    <li>Lorem ip<img class="icon" src="https://www.java2s.com/style/demo/Opera.png"> </li> 
    <li>Lorem ip<img class="icon" src="https://www.java2s.com/style/demo/Opera.png"> </li> 
    <li>Lorem ip<img class="icon" src="https://www.java2s.com/style/demo/InternetExplorer.png"> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials