index.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>loading</title>
  8. <style>
  9. /* 首次加载的 loading 样式 */
  10. #app-loading {
  11. position: fixed;
  12. top: 0;
  13. left: 0;
  14. width: 100%;
  15. height: 100%;
  16. display: flex;
  17. flex-direction: column;
  18. align-items: center;
  19. justify-content: center;
  20. background: #fff;
  21. z-index: 9999;
  22. }
  23. /* Spinner 动画 */
  24. .spinner {
  25. width: 50px;
  26. height: 50px;
  27. border: 4px solid #f3f3f3;
  28. border-top: 4px solid #1890ff;
  29. border-radius: 50%;
  30. animation: spin 1s linear infinite;
  31. }
  32. @keyframes spin {
  33. 0% {
  34. transform: rotate(0deg);
  35. }
  36. 100% {
  37. transform: rotate(360deg);
  38. }
  39. }
  40. .loading-text {
  41. margin-top: 20px;
  42. color: #666;
  43. font-size: 14px;
  44. font-family:
  45. -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  46. }
  47. /* Dark mode 支持 */
  48. @media (prefers-color-scheme: dark) {
  49. #app-loading {
  50. background: #141414;
  51. }
  52. .spinner {
  53. border-color: #333;
  54. border-top-color: #1890ff;
  55. }
  56. .loading-text {
  57. color: #999;
  58. }
  59. }
  60. </style>
  61. </head>
  62. <body>
  63. <noscript>You need to enable JavaScript to run this app.</noscript>
  64. <!-- 🎯 首次加载 Loading -->
  65. <div id="app-loading">
  66. <div class="spinner"></div>
  67. <div class="loading-text">加载中,请稍候...</div>
  68. </div>
  69. <div id="root"></div>
  70. <script type="module" src="/src/main.tsx"></script>
  71. </body>
  72. </html>