animation.css 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* make keyframes that tell the start state and the end state of our object */
  2. @-webkit-keyframes fadeIn {
  3. from {
  4. opacity: 0;
  5. }
  6. to {
  7. opacity: 1;
  8. }
  9. }
  10. @-moz-keyframes fadeIn {
  11. from {
  12. opacity: 0;
  13. }
  14. to {
  15. opacity: 1;
  16. }
  17. }
  18. @keyframes fadeIn {
  19. from {
  20. opacity: 0;
  21. }
  22. to {
  23. opacity: 1;
  24. }
  25. }
  26. .fade-in {
  27. opacity: 0; /* make things invisible upon start */
  28. -webkit-animation: fadein ease-in 1; /* call our keyframe named fadeIn, use animattion ease-in and repeat it only 1 time */
  29. -moz-animation: fadein ease-in 1;
  30. animation: fadeIn ease-in 1;
  31. -webkit-animation-fill-mode: forwards; /* this makes sure that after animation is done we remain at the last keyframe value (opacity: 1) */
  32. -moz-animation-fill-mode: forwards;
  33. animation-fill-mode: forwards;
  34. -webkit-animation-duration: 2s;
  35. -moz-animation-duration: 2s;
  36. animation-duration: 2s;
  37. }
  38. .fade-in.one {
  39. -webkit-animation-delay: 0.5s;
  40. -moz-animation-delay: 0.5s;
  41. animation-delay: 0.5s;
  42. }
  43. .fade-in.two {
  44. -webkit-animation-delay: 1s;
  45. -moz-animation-delay: 1s;
  46. animation-delay: 1s;
  47. }
  48. .fade-in.three {
  49. -webkit-animation-delay: 1.5s;
  50. -moz-animation-delay: 1.5s;
  51. animation-delay: 1.5s;
  52. }
  53. .fade-in.four {
  54. -webkit-animation-delay: 2s;
  55. -moz-animation-delay: 2s;
  56. animation-delay: 2s;
  57. }
  58. /* page transition */
  59. .fade-enter {
  60. opacity: 0;
  61. }
  62. .fade-enter.fade-enter-active {
  63. opacity: 1;
  64. transition: opacity 500ms ease-in;
  65. }
  66. .fade-exit {
  67. opacity: 1;
  68. }
  69. .fade-exit.fade-exit-active {
  70. opacity: 0;
  71. transition: opacity 300ms ease-in;
  72. }