index.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="icon" href="/favicon.ico">
  6. <meta name="viewport"
  7. content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
  8. <title>H5基础开发模板</title>
  9. </head>
  10. <body>
  11. <div id="app">
  12. <div class="loader">
  13. <div class="loader-inner">
  14. <div class="loader-line-wrap">
  15. <div class="loader-line"></div>
  16. </div>
  17. <div class="loader-line-wrap">
  18. <div class="loader-line"></div>
  19. </div>
  20. <div class="loader-line-wrap">
  21. <div class="loader-line"></div>
  22. </div>
  23. <div class="loader-line-wrap">
  24. <div class="loader-line"></div>
  25. </div>
  26. <div class="loader-line-wrap">
  27. <div class="loader-line"></div>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. <script type="module" src="/src/main.js"></script>
  33. <!-- 开启底部安全区适配 -->
  34. <van-number-keyboard safe-area-inset-bottom />
  35. </body>
  36. </html>
  37. <style>
  38. #app {
  39. height: 100%;
  40. }
  41. .loader {
  42. /* background: #000; */
  43. /* background: radial-gradient(#777, #111); */
  44. bottom: 0;
  45. left: 0;
  46. overflow: hidden;
  47. position: fixed;
  48. right: 0;
  49. top: 0;
  50. z-index: 99999;
  51. }
  52. .loader-inner {
  53. bottom: 0;
  54. height: 120px;
  55. left: 0;
  56. margin: auto;
  57. position: absolute;
  58. right: 0;
  59. top: 0;
  60. width: 200px;
  61. }
  62. .loader-line-wrap {
  63. animation:
  64. spin 2000ms cubic-bezier(.175, .885, .32, 1.275) infinite;
  65. box-sizing: border-box;
  66. height: 100px;
  67. left: 0;
  68. overflow: hidden;
  69. position: absolute;
  70. top: 0;
  71. transform-origin: 50% 100%;
  72. width: 200px;
  73. }
  74. .loader-line {
  75. border: 8px solid transparent;
  76. border-radius: 100%;
  77. box-sizing: border-box;
  78. height: 200px;
  79. left: 0;
  80. margin: 0 auto;
  81. position: absolute;
  82. right: 0;
  83. top: 0;
  84. width: 200px;
  85. }
  86. .loader-line-wrap:nth-child(1) {
  87. animation-delay: -50ms;
  88. }
  89. .loader-line-wrap:nth-child(2) {
  90. animation-delay: -100ms;
  91. }
  92. .loader-line-wrap:nth-child(3) {
  93. animation-delay: -150ms;
  94. }
  95. .loader-line-wrap:nth-child(4) {
  96. animation-delay: -200ms;
  97. }
  98. .loader-line-wrap:nth-child(5) {
  99. animation-delay: -250ms;
  100. }
  101. .loader-line-wrap:nth-child(1) .loader-line {
  102. border-color: hsl(0, 100%, 60%);
  103. height: 180px;
  104. width: 180px;
  105. top: 14px;
  106. }
  107. .loader-line-wrap:nth-child(2) .loader-line {
  108. border-color: hsl(60, 100%, 60%);
  109. height: 152px;
  110. width: 152px;
  111. top: 28px;
  112. }
  113. .loader-line-wrap:nth-child(3) .loader-line {
  114. border-color: hsl(120, 100%, 60%);
  115. height: 124px;
  116. width: 124px;
  117. top: 42px;
  118. }
  119. .loader-line-wrap:nth-child(4) .loader-line {
  120. border-color: hsl(180, 100%, 60%);
  121. height: 96px;
  122. width: 96px;
  123. top: 56px;
  124. }
  125. .loader-line-wrap:nth-child(5) .loader-line {
  126. border-color: hsl(240, 100%, 60%);
  127. height: 68px;
  128. width: 68px;
  129. top: 70px;
  130. }
  131. @keyframes spin {
  132. 0%,
  133. 15% {
  134. transform: rotate(0);
  135. }
  136. 100% {
  137. transform: rotate(360deg);
  138. }
  139. }
  140. </style>