loading.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <div id='loadingbar' class="spinner">
  3. <div class="spinner-container container1">
  4. <div class="circle1"></div>
  5. <div class="circle2"></div>
  6. <div class="circle3"></div>
  7. <div class="circle4"></div>
  8. </div>
  9. <div class="spinner-container container2">
  10. <div class="circle1"></div>
  11. <div class="circle2"></div>
  12. <div class="circle3"></div>
  13. <div class="circle4"></div>
  14. </div>
  15. <div class="spinner-container container3">
  16. <div class="circle1"></div>
  17. <div class="circle2"></div>
  18. <div class="circle3"></div>
  19. <div class="circle4"></div>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. export default {
  25. name: "loadingBar",
  26. }
  27. </script>
  28. <style lang="scss" scoped>
  29. .spinner {
  30. width: 60px;
  31. height: 60px;
  32. position: absolute;
  33. left: 50%;
  34. top: 50%;
  35. transform: translate(-50%, -50%);
  36. z-index: 1000;
  37. }
  38. .container1 > div, .container2 > div, .container3 > div {
  39. width: 16px;
  40. height: 16px;
  41. /*background-color: #67cf22;*/
  42. background-color: #3498db;
  43. border-radius: 100%;
  44. position: absolute;
  45. -webkit-animation: bouncedelay 1.2s infinite ease-in-out;
  46. animation: bouncedelay 1.2s infinite ease-in-out;
  47. -webkit-animation-fill-mode: both;
  48. animation-fill-mode: both;
  49. }
  50. .spinner .spinner-container {
  51. position: absolute;
  52. width: 100%;
  53. height: 100%;
  54. }
  55. .container2 {
  56. -webkit-transform: rotateZ(45deg);
  57. transform: rotateZ(45deg);
  58. }
  59. .container3 {
  60. -webkit-transform: rotateZ(90deg);
  61. transform: rotateZ(90deg);
  62. }
  63. .circle1 { top: 0; left: 0; }
  64. .circle2 { top: 0; right: 0; }
  65. .circle3 { right: 0; bottom: 0; }
  66. .circle4 { left: 0; bottom: 0; }
  67. .container2 .circle1 {
  68. -webkit-animation-delay: -1.1s;
  69. animation-delay: -1.1s;
  70. }
  71. .container3 .circle1 {
  72. -webkit-animation-delay: -1.0s;
  73. animation-delay: -1.0s;
  74. }
  75. .container1 .circle2 {
  76. -webkit-animation-delay: -0.9s;
  77. animation-delay: -0.9s;
  78. }
  79. .container2 .circle2 {
  80. -webkit-animation-delay: -0.8s;
  81. animation-delay: -0.8s;
  82. }
  83. .container3 .circle2 {
  84. -webkit-animation-delay: -0.7s;
  85. animation-delay: -0.7s;
  86. }
  87. .container1 .circle3 {
  88. -webkit-animation-delay: -0.6s;
  89. animation-delay: -0.6s;
  90. }
  91. .container2 .circle3 {
  92. -webkit-animation-delay: -0.5s;
  93. animation-delay: -0.5s;
  94. }
  95. .container3 .circle3 {
  96. -webkit-animation-delay: -0.4s;
  97. animation-delay: -0.4s;
  98. }
  99. .container1 .circle4 {
  100. -webkit-animation-delay: -0.3s;
  101. animation-delay: -0.3s;
  102. }
  103. .container2 .circle4 {
  104. -webkit-animation-delay: -0.2s;
  105. animation-delay: -0.2s;
  106. }
  107. .container3 .circle4 {
  108. -webkit-animation-delay: -0.1s;
  109. animation-delay: -0.1s;
  110. }
  111. @-webkit-keyframes bouncedelay {
  112. 0%, 80%, 100% { -webkit-transform: scale(0.0) }
  113. 40% { -webkit-transform: scale(1.0) }
  114. }
  115. @keyframes bouncedelay {
  116. 0%, 80%, 100% {
  117. transform: scale(0.0);
  118. -webkit-transform: scale(0.0);
  119. } 40% {
  120. transform: scale(1.0);
  121. -webkit-transform: scale(1.0);
  122. }
  123. }
  124. </style>