_animation.scss 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. @keyframes rotateOpen{
  2. 0% {transform: rotate(-15deg);}
  3. 100% {transform: rotate(0deg);}
  4. }
  5. @keyframes rotateClose{
  6. 0% { transform: rotate(0deg);}
  7. 100% {transform: rotate(-15deg);}
  8. }
  9. @keyframes translateOpen{
  10. 0%{margin-top: 0px;}
  11. 100%{margin-top: -155px;}
  12. }
  13. @keyframes translateClose{
  14. 0%{margin-top: -155px;}
  15. 100%{margin-top: 0px;}
  16. }
  17. @keyframes translateOpensvg{
  18. 0%{margin-top: 50px;}
  19. 100%{margin-top: 180px;}
  20. }
  21. @keyframes translateClosesvg{
  22. 0%{margin-top: 180px;}
  23. 100%{margin-top: 50px;}
  24. }
  25. @keyframes visible{
  26. 0%{
  27. opacity: 0;
  28. transform: translateY(50px);
  29. }
  30. 100%{
  31. opacity: 1;
  32. transform: translateY(0px);
  33. }
  34. }
  35. @keyframes hidden{
  36. 0%{
  37. opacity: 1;
  38. transform: translateY(0px);
  39. }
  40. 100%{
  41. opacity: 0;
  42. transform: translateY(50px);
  43. }
  44. }
  45. .why_lsdo{
  46. &.open{
  47. h3{
  48. animation: rotateOpen 1s, translateOpen 1s;
  49. animation-fill-mode: forwards;
  50. }
  51. section{
  52. animation: visible 1s;
  53. animation-fill-mode: forwards;
  54. }
  55. svg{
  56. animation: rotateOpen 1s, translateOpensvg 1s;
  57. animation-fill-mode: forwards;
  58. }
  59. }
  60. &.close{
  61. h3{
  62. animation: rotateClose 1s, translateClose 1s;
  63. animation-fill-mode: forwards;
  64. }
  65. section{
  66. animation: hidden 1s;
  67. animation-fill-mode: forwards;
  68. }
  69. svg{
  70. animation: rotateClose 1s, translateClosesvg 1s;
  71. animation-fill-mode: forwards;
  72. }
  73. }
  74. }