Show element on hover another using css - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover to Show

Description

Show element on hover another using css

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">
.portfolio-reaction {<!--from  w w w.  ja v  a  2s .  co  m-->
   width:251px;
   height:251px;
   display:block;
   text-decoration:none;
}

.headline-overlay {
   background:none;
   height:100%;
   width:calc(100%-11px);
   display:none;
   position:relative;
   top:-100%;
   z-index:1000;
   text-align:left;
   padding-left:11px;
   font-weight:bold;
   font-size:2.4em;
   color:Chartreuse;
}

.portfolio-reaction:hover .headline-overlay {
   display:block;
}
</style> 
 </head> 
 <body> 
  <a title="#" class="portfolio-reaction" href="#"> <img src="https://www.java2s.com/style/demo/Opera.png" class="attachment-grid-feat"> 
   <div class="headline-overlay"> 
    <p class="element-1">Lor</p> 
    <p class="element-2">Lor</p> 
    <div class="element-3">
      Lor 
    </div> 
   </div> </a>  
 </body>
</html>

Related Tutorials