Creating a Web Page background fade with animation - HTML CSS CSS Animatable Property

HTML CSS examples for CSS Animatable Property:background

Description

Creating a Web Page background fade with animation

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  ww w  .  j  a  v a  2 s .c  o m-->
   animation: background 4s forwards;
   -webkit-animation: background 4s forwards;
   -moz-animation: background 4s forwards;
}
@-webkit-keyframes background {
   from {
      background:white;
   }
   to {
      background:#000;
   }
}
@-moz-keyframes background {
   from {
      background:white;
   }
   to {
      background:#000;
   }
}
@keyframes background {
   from {
      background:white;
   }
   to {
      background:#000;
   }
}


      </style> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials