animation.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /*
  2. Animation 微动画
  3. */
  4. /* Animation css */
  5. [class*=animation-] {
  6. animation-duration: .1s;
  7. animation-timing-function: ease-out;
  8. animation-fill-mode: both
  9. }
  10. .animation-fade {
  11. animation-name: fade;
  12. animation-duration: .1s;
  13. animation-timing-function: linear
  14. }
  15. .animation-scale-up {
  16. animation-name: scale-up
  17. }
  18. .animation-scale-down {
  19. animation-name: scale-down
  20. }
  21. .animation-slide-top {
  22. animation-duration: .3s;
  23. animation-name: slide-top
  24. }
  25. .animation-slide-bottom {
  26. animation-duration: .3s;
  27. animation-name: slide-bottom
  28. }
  29. .animation-slide-left {
  30. animation-name: slide-left
  31. }
  32. .animation-slide-right {
  33. animation-name: slide-right
  34. }
  35. .animation-shake {
  36. animation-name: shake
  37. }
  38. .animation-reverse {
  39. animation-direction: reverse
  40. }
  41. @keyframes fade {
  42. 0% {
  43. opacity: 0
  44. }
  45. 100% {
  46. opacity: 1
  47. }
  48. }
  49. @keyframes scale-up {
  50. 0% {
  51. opacity: 0;
  52. transform: scale(.2)
  53. }
  54. 100% {
  55. opacity: 1;
  56. transform: scale(1)
  57. }
  58. }
  59. @keyframes scale-down {
  60. 0% {
  61. opacity: 0;
  62. transform: scale(1.8)
  63. }
  64. 100% {
  65. opacity: 1;
  66. transform: scale(1)
  67. }
  68. }
  69. @keyframes slide-top {
  70. 0% {
  71. /* opacity: 0; */
  72. transform: translateY(-100%)
  73. }
  74. 100% {
  75. /* opacity: 1; */
  76. transform: translateY(0)
  77. }
  78. }
  79. @keyframes slide-bottom {
  80. 0% {
  81. opacity: 0;
  82. transform: translateY(100%)
  83. }
  84. 100% {
  85. opacity: 1;
  86. transform: translateY(0)
  87. }
  88. }
  89. @keyframes shake {
  90. 0%,
  91. 100% {
  92. transform: translateX(0)
  93. }
  94. 10% {
  95. transform: translateX(-9px)
  96. }
  97. 20% {
  98. transform: translateX(8px)
  99. }
  100. 30% {
  101. transform: translateX(-7px)
  102. }
  103. 40% {
  104. transform: translateX(6px)
  105. }
  106. 50% {
  107. transform: translateX(-5px)
  108. }
  109. 60% {
  110. transform: translateX(4px)
  111. }
  112. 70% {
  113. transform: translateX(-3px)
  114. }
  115. 80% {
  116. transform: translateX(2px)
  117. }
  118. 90% {
  119. transform: translateX(-1px)
  120. }
  121. }
  122. @keyframes slide-left {
  123. 0% {
  124. opacity: 0;
  125. transform: translateX(-100%)
  126. }
  127. 100% {
  128. opacity: 1;
  129. transform: translateX(0)
  130. }
  131. }
  132. @keyframes slide-right {
  133. 0% {
  134. opacity: 0;
  135. transform: translateX(100%)
  136. }
  137. 100% {
  138. opacity: 1;
  139. transform: translateX(0)
  140. }
  141. }