loading2.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <view class="container loading2">
  3. <view class="shape shape1"></view>
  4. <view class="shape shape2"></view>
  5. <view class="shape shape3"></view>
  6. <view class="shape shape4"></view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. name: 'loading2',
  12. data() {
  13. return {};
  14. }
  15. }
  16. </script>
  17. <style scoped="true">
  18. .container {
  19. width: 30px;
  20. height: 30px;
  21. position: relative;
  22. }
  23. .container.loading2 {
  24. -webkit-transform: rotate(10deg);
  25. transform: rotate(10deg);
  26. }
  27. .container.loading2 .shape {
  28. border-radius: 5px;
  29. }
  30. .container.loading2 {
  31. -webkit-animation: rotation 1s infinite;
  32. animation: rotation 1s infinite;
  33. }
  34. .container .shape {
  35. position: absolute;
  36. width: 10px;
  37. height: 10px;
  38. border-radius: 1px;
  39. }
  40. .container .shape.shape1 {
  41. left: 0;
  42. background-color: #1890FF;
  43. }
  44. .container .shape.shape2 {
  45. right: 0;
  46. background-color: #91CB74;
  47. }
  48. .container .shape.shape3 {
  49. bottom: 0;
  50. background-color: #FAC858;
  51. }
  52. .container .shape.shape4 {
  53. bottom: 0;
  54. right: 0;
  55. background-color: #EE6666;
  56. }
  57. .loading2 .shape1 {
  58. -webkit-animation: animation2shape1 0.5s ease 0s infinite alternate;
  59. animation: animation2shape1 0.5s ease 0s infinite alternate;
  60. }
  61. @-webkit-keyframes animation2shape1 {
  62. from {
  63. -webkit-transform: translate(0, 0);
  64. transform: translate(0, 0);
  65. }
  66. to {
  67. -webkit-transform: translate(20px, 20px);
  68. transform: translate(20px, 20px);
  69. }
  70. }
  71. @keyframes animation2shape1 {
  72. from {
  73. -webkit-transform: translate(0, 0);
  74. transform: translate(0, 0);
  75. }
  76. to {
  77. -webkit-transform: translate(20px, 20px);
  78. transform: translate(20px, 20px);
  79. }
  80. }
  81. .loading2 .shape2 {
  82. -webkit-animation: animation2shape2 0.5s ease 0s infinite alternate;
  83. animation: animation2shape2 0.5s ease 0s infinite alternate;
  84. }
  85. @-webkit-keyframes animation2shape2 {
  86. from {
  87. -webkit-transform: translate(0, 0);
  88. transform: translate(0, 0);
  89. }
  90. to {
  91. -webkit-transform: translate(-20px, 20px);
  92. transform: translate(-20px, 20px);
  93. }
  94. }
  95. @keyframes animation2shape2 {
  96. from {
  97. -webkit-transform: translate(0, 0);
  98. transform: translate(0, 0);
  99. }
  100. to {
  101. -webkit-transform: translate(-20px, 20px);
  102. transform: translate(-20px, 20px);
  103. }
  104. }
  105. .loading2 .shape3 {
  106. -webkit-animation: animation2shape3 0.5s ease 0s infinite alternate;
  107. animation: animation2shape3 0.5s ease 0s infinite alternate;
  108. }
  109. @-webkit-keyframes animation2shape3 {
  110. from {
  111. -webkit-transform: translate(0, 0);
  112. transform: translate(0, 0);
  113. }
  114. to {
  115. -webkit-transform: translate(20px, -20px);
  116. transform: translate(20px, -20px);
  117. }
  118. }
  119. @keyframes animation2shape3 {
  120. from {
  121. -webkit-transform: translate(0, 0);
  122. transform: translate(0, 0);
  123. }
  124. to {
  125. -webkit-transform: translate(20px, -20px);
  126. transform: translate(20px, -20px);
  127. }
  128. }
  129. .loading2 .shape4 {
  130. -webkit-animation: animation2shape4 0.5s ease 0s infinite alternate;
  131. animation: animation2shape4 0.5s ease 0s infinite alternate;
  132. }
  133. @-webkit-keyframes animation2shape4 {
  134. from {
  135. -webkit-transform: translate(0, 0);
  136. transform: translate(0, 0);
  137. }
  138. to {
  139. -webkit-transform: translate(-20px, -20px);
  140. transform: translate(-20px, -20px);
  141. }
  142. }
  143. @keyframes animation2shape4 {
  144. from {
  145. -webkit-transform: translate(0, 0);
  146. transform: translate(0, 0);
  147. }
  148. to {
  149. -webkit-transform: translate(-20px, -20px);
  150. transform: translate(-20px, -20px);
  151. }
  152. }
  153. </style>