index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <template>
  2. <div class="box">
  3. <div class="load-container">
  4. <div class="boxLoading"></div>
  5. </div>
  6. </div>
  7. </template>
  8. <script setup>
  9. import { ref } from 'vue'
  10. </script>
  11. <script>
  12. export default {
  13. name: ''
  14. }
  15. </script>
  16. <style scoped lang="scss">
  17. .box {
  18. z-index: 999;
  19. position: static;
  20. width: 100%;
  21. height: 100%;
  22. background-color: rgba($color: #333, $alpha: .9);
  23. }
  24. .load-container {
  25. position: absolute;
  26. left: 50%;
  27. top: 50%;
  28. transform: translate(-50%, -50%);
  29. width: 90px;
  30. height: 90px;
  31. margin: 0 auto;
  32. .boxLoading {
  33. width: 50px;
  34. height: 50px;
  35. margin: auto;
  36. position: absolute;
  37. left: 0;
  38. right: 0;
  39. top: 0;
  40. bottom: 0;
  41. &:before {
  42. content: "";
  43. width: 50px;
  44. height: 5px;
  45. background: #000;
  46. opacity: 0.1;
  47. position: absolute;
  48. top: 59px;
  49. left: 0;
  50. border-radius: 50%;
  51. animation: shadow 0.5s linear infinite;
  52. }
  53. &:after {
  54. content: "";
  55. width: 50px;
  56. height: 50px;
  57. background: #00adb5;
  58. animation: animate 0.5s linear infinite;
  59. position: absolute;
  60. top: 0;
  61. left: 0;
  62. border-radius: 3px;
  63. }
  64. }
  65. }
  66. @keyframes animate {
  67. 17% {
  68. border-bottom-right-radius: 3px;
  69. }
  70. 25% {
  71. transform: translateY(9px) rotate(22.5deg);
  72. }
  73. 50% {
  74. transform: translateY(18px) scale(1, 0.9) rotate(45deg);
  75. border-bottom-right-radius: 40px;
  76. }
  77. 75% {
  78. transform: translateY(9px) rotate(67.5deg);
  79. }
  80. 100% {
  81. transform: translateY(0) rotate(90deg);
  82. }
  83. }
  84. @keyframes shadow {
  85. 0%,
  86. 100% {
  87. transform: scale(1, 1);
  88. }
  89. 50% {
  90. transform: scale(1.2, 1);
  91. }
  92. }
  93. </style>