animation.css 2.5 KB

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