Show/hide a div on hover and hover out - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover to Show

Description

Show/hide a div on hover and hover out

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">
#stuff {<!--  w  ww . j  av a2 s  . co  m-->
   opacity:0.0;
   -webkit-transition:all 501ms ease-in-out;
   -moz-transition:all 501ms ease-in-out;
   -ms-transition:all 501ms ease-in-out;
   -o-transition:all 501ms ease-in-out;
   transition:all 501ms ease-in-out;
}

#hover {
   width:81px;
   height:21px;
   background-color:Chartreuse;
   margin-bottom:16px;
}

#hover:hover + #stuff {
   opacity:2.0;
}
</style> 
 </head> 
 <body> 
  <div id="hover">
    Lorem ipsum 
  </div> 
  <div id="stuff">
    Lorem ipsum 
   <br> 
   <img src="https://www.java2s.com/style/demo/InternetExplorer.png" width="150" height="110"> 
  </div>  
 </body>
</html>

Related Tutorials