Css animation and keyframes - HTML CSS CSS Animation

HTML CSS examples for CSS Animation:Keyframe

Description

Css animation and keyframes

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

#cube{<!--from w  ww  .  ja v  a2  s.c  o m-->
   position: relative;
   left:60px;
   width:60px;
   height:80px;
   top:0px;
   opacity: 0;
   background:red;
   -webkit-animation-name: cube;
   -webkit-animation-iteration-count: 1;
   -webkit-animation-timing-function: ease-in-out;
   -webkit-animation-delay: 2s;
   -webkit-animation-fill-mode: forwards;
   -webkit-animation-duration: 0.8s;
}
@-webkit-keyframes cube {
   0% {opacity: 0;}
   100% {opacity: 1;}
}


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

Related Tutorials