animate.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /**
  2. * 自定义动画
  3. */
  4. @keyframes rotation {
  5. from {
  6. transform: rotate(0deg);
  7. }
  8. to {
  9. transform: rotate(359deg);
  10. }
  11. }
  12. /* 旋转 */
  13. .xuanzhun {
  14. animation: rotation 1s linear infinite;
  15. }
  16. /* 加载动画 */
  17. @keyframes translate-line1 {
  18. 30%,
  19. 50% {
  20. height: 20rpx;
  21. transform: translateY(-10rpx);
  22. }
  23. 75%,
  24. 100% {
  25. height: 10rpx;
  26. transform: translateY(0);
  27. }
  28. }
  29. @keyframes translate-line2 {
  30. 30%,
  31. 50% {
  32. height: 40rpx;
  33. transform: translateY(-20rpx);
  34. }
  35. 75%,
  36. 100% {
  37. height: 10rpx;
  38. transform: translateY(0);
  39. }
  40. }
  41. @keyframes translate-line3 {
  42. 30%,
  43. 50% {
  44. height: 60rpx;
  45. transform: translateY(-30rpx);
  46. }
  47. 75%,
  48. 100% {
  49. height: 10rpx;
  50. transform: translateY(0);
  51. }
  52. }
  53. .translate-line {
  54. width: 60rpx;
  55. height: 30rpx;
  56. display: flex;
  57. .line {
  58. flex: 1;
  59. margin: 2rpx;
  60. height: 10rpx;
  61. &:nth-child(1) {
  62. background-color: #52A63A;
  63. animation: translate-line1 2s infinite;
  64. }
  65. &:nth-child(2) {
  66. background-color: #52A63A;
  67. animation: translate-line2 2s infinite;
  68. animation-delay: 0.15s;
  69. }
  70. &:nth-child(3) {
  71. background-color: #52A63A;
  72. animation: translate-line3 2s infinite;
  73. animation-delay: 0.3s;
  74. }
  75. &:nth-child(4) {
  76. background-color: #52A63A;
  77. animation: translate-line3 2s infinite;
  78. animation-delay: 0.45s;
  79. }
  80. &:nth-child(5) {
  81. background-color: #52A63A;
  82. animation: translate-line2 2s infinite;
  83. animation-delay: 0.6s;
  84. }
  85. &:nth-child(6) {
  86. background-color: #52A63A;
  87. animation: translate-line1 2s infinite;
  88. animation-delay: 0.75s;
  89. }
  90. }
  91. }