Posted By

buda9 on 06/02/14


Tagged

opacity fade animation


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

citruz


animate website on load (opacity, fade)


 / Published in: CSS
 

Just add 2 classed (animated fadeInDown) to body

  1. /* <body class="animated fadeInDown"> ... </body> */
  2.  
  3. .fadeInDown{
  4. -webkit-animation-name:fadeInDown;
  5. animation-name:fadeInDown
  6. }
  7.  
  8. .animated{
  9. -webkit-animation-duration:1s;
  10. animation-duration:1s;
  11. -webkit-animation-fill-mode:both;
  12. animation-fill-mode:both
  13. }
  14.  
  15. @-webkit-keyframes fadeInDown {
  16. 0%{
  17. opacity:0;
  18. -webkit-transform:translateY(-10px);
  19. transform:translateY(-10px)
  20. }
  21. 100%{
  22. opacity:1;
  23. -webkit-transform:translateY(0);
  24. transform:translateY(0)
  25. }
  26. }
  27.  
  28. @keyframes fadeInDown {
  29. 0%{
  30. opacity:0;
  31. -webkit-transform:translateY(-10px);
  32. -ms-transform:translateY(-10px);
  33. transform:translateY(-10px)
  34. }
  35. 100%{
  36. opacity:1;
  37. -webkit-transform:translateY(0);
  38. -ms-transform:translateY(0);
  39. transform:translateY(0)
  40. }
  41. }

Report this snippet  

You need to login to post a comment.