index.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <link rel="icon" type="image/svg+xml" href="/vite.svg" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <script src="https://4dkk.4dage.com/v4-test/www/viewer/static/lib/vconsole.js"></script>
  8. <title>Getty Show</title>
  9. <style>
  10. body {
  11. background-color: #000;
  12. overflow: hidden;
  13. }
  14. .load-wrap {
  15. display: flex;
  16. flex-direction: column;
  17. height: 100vh;
  18. justify-content: center;
  19. align-items: center;
  20. }
  21. .load-wrap div:nth-child(3) {
  22. align-items: flex-start;
  23. }
  24. .page-loader {
  25. margin-top: 20px;
  26. color: #fff;
  27. line-height: 1.4;
  28. font-size: 1rem;
  29. font-weight: 600;
  30. font-family: sans-serif;
  31. }
  32. .page-process {
  33. margin-top: 15px;
  34. }
  35. .loader {
  36. width: 48px;
  37. height: 48px;
  38. border: 3px dotted #fff;
  39. border-style: solid solid dotted dotted;
  40. border-radius: 50%;
  41. display: inline-block;
  42. position: relative;
  43. box-sizing: border-box;
  44. animation: rotation 2s linear infinite;
  45. }
  46. .loader::after {
  47. content: "";
  48. box-sizing: border-box;
  49. position: absolute;
  50. left: 0;
  51. right: 0;
  52. top: 0;
  53. bottom: 0;
  54. margin: auto;
  55. border: 3px dotted #15bec8;
  56. border-style: solid solid dotted;
  57. width: 24px;
  58. height: 24px;
  59. border-radius: 50%;
  60. animation: rotationBack 1s linear infinite;
  61. transform-origin: center center;
  62. }
  63. @keyframes rotation {
  64. 0% {
  65. transform: rotate(0deg);
  66. }
  67. 100% {
  68. transform: rotate(360deg);
  69. }
  70. }
  71. @keyframes rotationBack {
  72. 0% {
  73. transform: rotate(0deg);
  74. }
  75. 100% {
  76. transform: rotate(-360deg);
  77. }
  78. }
  79. </style>
  80. </head>
  81. <body>
  82. <div id="root">
  83. <div class="load-wrap">
  84. <div class="loader"></div>
  85. <div>
  86. <div id="page-process" class="page-process">0%</div>
  87. </div>
  88. </div>
  89. </div>
  90. <script type="module" src="/src/main.jsx"></script>
  91. <script>
  92. let loadProgress = 0;
  93. const pageLoader = document.querySelector("#page-process"),
  94. loadAnimation = setInterval(() => {
  95. if (
  96. (loadProgress++,
  97. (pageLoader.innerText = loadProgress + "%"),
  98. 72 === loadProgress)
  99. ) {
  100. clearInterval(loadAnimation);
  101. const e = setInterval(() => {
  102. loadProgress++,
  103. (pageLoader.innerText = loadProgress + "%"),
  104. 83 === loadProgress && clearInterval(e);
  105. }, 86);
  106. }
  107. }, 32);
  108. </script>
  109. </body>
  110. </html>