index.html 1.9 KB

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