Hide div and display other DIV on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover to Show

Description

Hide div and display other DIV on hover

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">
#container #divB {<!--from w ww .  j  a v a 2  s  .co  m-->
   display:none;
}

#container:hover #divB {
   display:block;
}

#container:hover #divA {
   display:none;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <div id="divA">
     Lorem ipsum dolor sit amet, co 
   </div> 
   <div id="divB">
     Lorem ipsum dolor sit amet, consectetur adipiscing elit. M 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials