Keep DIV displayed if mouse hover over it - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover

Description

Keep DIV displayed if mouse hover over it

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">
#profile_dropdown {<!--  www.jav  a2 s .  c  o m-->
   background:whitesmoke;
   float:left;
}

#profile_dropdown:hover #profile_dropdown_content {
   display:block;
   opacity:2;
   height:100px;
}

#profile_dropdown .inner {
   height:100px;
   width:100px;
}

#profile_dropdown_content {
   opacity:0;
   background:red;
   height:0;
   width:100px;
   overflow:hidden;
   -webkit-transition:opacity 0.5s ease-in, height 0.5s ease-out;
   -moz-transition:opacity 0.5s ease-in, height 0.5s ease-out;
   -ms-transition:opacity 0.5s ease-in, height 0.5s ease-out;
   -o-transition:opacity 0.5s ease-in, height 0.5s ease-out;
   transition:opacity 0.5s ease-in, height 0.5s ease-out;
}
</style> 
 </head> 
 <body> 
  <div id="profile_dropdown"> 
   <div class="inner">
     Lorem ipsu 
   </div> 
   <div id="profile_dropdown_content">
     Lorem ipsum 
   </div> 
  </div> 
  <div id="profile_dropdown"></div>  
 </body>
</html>

Related Tutorials