HTML CSS examples for CSS Widget:Hover Animation
Transition hover div css
<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>