Transition Animation on Position Property - HTML CSS CSS Animatable Property

HTML CSS examples for CSS Animatable Property:top

Description

Transition Animation on Position Property

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">

#hoverme {<!--from  w w w .  j a  va2 s.c  om-->
   background: rgba(255, 0, 0, 0.7);
   height:100px;
   position: absolute;
   top:50px;
   width: 100%;
   -webkit-transition: all 1s ease;
   transition: all 1s ease;
}
#hoverme:hover {
   top: 0px;
}


      </style> 
 </head> 
 <body> 
  <div id="hoverme"></div>  
 </body>
</html>

Related Tutorials