animations.css 978 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. animation: fadeIn ease-in 1; /* call our keyframe named fadeIn, use animation ease-in and repeat it only 1 time */
  29. animation-fill-mode: forwards; /* this makes sure that after animation is done we remain at the last keyframe value (opacity: 1) */
  30. animation-duration: 0.5s;
  31. &.faster {
  32. animation-duration: 0.3s;
  33. }
  34. }
  35. /* page transition */
  36. .fade-enter {
  37. opacity: 0;
  38. }
  39. .fade-enter.fade-enter-active {
  40. opacity: 1;
  41. transition: opacity 500ms ease-in;
  42. }
  43. .fade-exit {
  44. opacity: 1;
  45. }
  46. .fade-exit.fade-exit-active {
  47. opacity: 0;
  48. transition: opacity 300ms ease-in;
  49. }