default-loading-antd.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <style data-app-loading="inject-css">
  2. html {
  3. /* same as ant-design-vue/dist/reset.css setting, avoid the title line-height changed */
  4. line-height: 1.15;
  5. }
  6. .dark .loading {
  7. background-color: #0d0d10;
  8. }
  9. .dark .loading .title {
  10. color: rgb(255 255 255 / 85%);
  11. }
  12. .loading {
  13. position: fixed;
  14. top: 0;
  15. left: 0;
  16. z-index: 9999;
  17. display: flex;
  18. flex-direction: column;
  19. align-items: center;
  20. justify-content: center;
  21. width: 100%;
  22. height: 100%;
  23. overflow: hidden;
  24. pointer-events: none;
  25. background-color: #f4f7f9;
  26. }
  27. .loading.hidden {
  28. visibility: hidden;
  29. opacity: 0;
  30. transition: all 0.6s ease-out;
  31. }
  32. .loading .dots {
  33. display: flex;
  34. align-items: center;
  35. justify-content: center;
  36. padding: 98px;
  37. }
  38. .loading .title {
  39. margin-top: 36px;
  40. font-size: 30px;
  41. font-weight: 600;
  42. color: rgb(0 0 0 / 85%);
  43. }
  44. .dot {
  45. position: relative;
  46. box-sizing: border-box;
  47. display: inline-block;
  48. width: 48px;
  49. height: 48px;
  50. margin-top: 30px;
  51. font-size: 32px;
  52. transform: rotate(45deg);
  53. animation: rotate-ani 1.2s infinite linear;
  54. }
  55. .dot i {
  56. position: absolute;
  57. display: block;
  58. width: 20px;
  59. height: 20px;
  60. background-color: hsl(var(--primary, 210 100% 50%));
  61. border-radius: 100%;
  62. opacity: 0.3;
  63. transform: scale(0.75);
  64. transform-origin: 50% 50%;
  65. animation: spin-move-ani 1s infinite linear alternate;
  66. }
  67. .dot i:nth-child(1) {
  68. top: 0;
  69. left: 0;
  70. }
  71. .dot i:nth-child(2) {
  72. top: 0;
  73. right: 0;
  74. animation-delay: 0.4s;
  75. }
  76. .dot i:nth-child(3) {
  77. right: 0;
  78. bottom: 0;
  79. animation-delay: 0.8s;
  80. }
  81. .dot i:nth-child(4) {
  82. bottom: 0;
  83. left: 0;
  84. animation-delay: 1.2s;
  85. }
  86. @keyframes rotate-ani {
  87. to {
  88. transform: rotate(405deg);
  89. }
  90. }
  91. @keyframes spin-move-ani {
  92. to {
  93. opacity: 1;
  94. }
  95. }
  96. </style>
  97. <div class="loading" id="__app-loading__">
  98. <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
  99. <div class="title"><%= VITE_APP_TITLE %></div>
  100. </div>