Make div move downwards on hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover

Description

Make div move downwards 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">

.box {<!--from  ww w.j  a va2  s  .  com-->
   height: 170px;
   padding-bottom: 15px;
   width: 50%;
}
.content {
   background-color: #e3e4e6;
   height: 100%;
   text-align: center;
}
.content:hover {
   margin-top: -50px;
   height: 110%;
}


      </style> 
 </head> 
 <body> 
  <div class="box"> 
   <div class="content">
     TEST 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials