How can I make a <p> element display on the hover of its parent <div> - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover

Description

How can I make a <p> element display on the hover of its parent <div>

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">
#parent:hover>.child {
   visibility:visible;
}

.child {<!--from   w w w. jav a2 s .  c o  m-->
   visibility:hidden;
}
</style> 
 </head> 
 <body> 
  <div id="parent"> 
   <p>Lorem ip</p> 
   <div class="child"> 
    <p>Lorem ipsum dolor sit amet,</p> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials