Enlarge a division with a specific class on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover class

Description

Enlarge a division with a specific class 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">
.col {<!--from  ww  w .j  a v  a 2s  .co m-->
   position:relative;
   width:31%;
   height:201px;
   display:inline-block;
   vertical-align:top;
   margin:11px;
}

.box {
   position:absolute;
   top:0;
   width:100%;
   height:201px;
   padding:6px;
   background:Chartreuse;
   border:3px solid yellow;
   transition:height .3s ease-out;
   -webkit-transition:height .3s ease-out;
}

.box__footer {
   position:absolute;
   bottom:0;
   display:none;
   padding:11px;
}

.box:hover {
   z-index:21;
   height:301px;
}

.box:hover .box__footer {
   display:block;
}
</style> 
 </head> 
 <body> 
  <div class="col"> 
   <div class="box">
     Lorem 
    <div class="box__footer">
      Lorem ip 
    </div> 
   </div> 
  </div> 
  <div class="col"> 
   <div class="box">
     Lorem 
    <div class="box__footer">
      Lorem ip 
    </div> 
   </div> 
  </div> 
  <div class="col"> 
   <div class="box">
     Lorem 
    <div class="box__footer">
      Lorem ip 
    </div> 
   </div> 
  </div> 
  <div class="col"> 
   <div class="box">
     Lorem 
    <div class="box__footer">
      Lorem ip 
    </div> 
   </div> 
  </div> 
  <div class="col"> 
   <div class="box">
     Lorem 
    <div class="box__footer">
      Lorem ip 
    </div> 
   </div> 
  </div> 
  <div class="col"> 
   <div class="box">
     Lorem 
    <div class="box__footer">
      Lorem ip 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials