Transition hover div css - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Animation

Description

Transition hover div 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">
body {<!--from  www . j a  va2 s .co  m-->
   overflow:hidden;
}

#mydiv {
   position:absolute;
   top:51%;
   left:51%;
   -webkit-transform:translateX(-51%) translateY(-51%);
   transform:translateX(-51%) translateY(-51%);
   -webkit-transition:all 3s;
   transition:all 3s;
}

#mydiv:hover {
   width:701px;
   margin-left:-351px;
   text-align:left;
   transition-duration:0s;
}
</style> 
 </head> 
 <body> 
  <div id="mydiv">
    Lorem ipsum dolor 
  </div>  
 </body>
</html>

Related Tutorials