index.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0" />
  7. <title></title>
  8. <!-- 优化:vue渲染未完成之前,先加一个css动画 -->
  9. <style>
  10. #loadingPage {
  11. background-color: #dedede;
  12. font-size: 12px;
  13. }
  14. .base {
  15. height: 9em;
  16. left: 50%;
  17. margin: -7.5em;
  18. padding: 3em;
  19. position: absolute;
  20. top: 50%;
  21. width: 9em;
  22. transform: rotateX(45deg) rotateZ(45deg);
  23. transform-style: preserve-3d;
  24. }
  25. .cube,
  26. .cube:after,
  27. .cube:before {
  28. content: '';
  29. float: left;
  30. height: 3em;
  31. position: absolute;
  32. width: 3em;
  33. }
  34. /* Top */
  35. .cube {
  36. background-color: #06cf68;
  37. position: relative;
  38. transform: translateZ(3em);
  39. transform-style: preserve-3d;
  40. transition: .25s;
  41. box-shadow: 13em 13em 1.5em rgba(0, 0, 0, 0.1);
  42. animation: anim 1s infinite;
  43. }
  44. .cube:after {
  45. background-color: #05a151;
  46. transform: rotateX(-90deg) translateY(3em);
  47. transform-origin: 100% 100%;
  48. }
  49. .cube:before {
  50. background-color: #026934;
  51. transform: rotateY(90deg) translateX(3em);
  52. transform-origin: 100% 0;
  53. }
  54. .cube:nth-child(1) {
  55. animation-delay: 0.05s;
  56. }
  57. .cube:nth-child(2) {
  58. animation-delay: 0.1s;
  59. }
  60. .cube:nth-child(3) {
  61. animation-delay: 0.15s;
  62. }
  63. .cube:nth-child(4) {
  64. animation-delay: 0.2s;
  65. }
  66. .cube:nth-child(5) {
  67. animation-delay: 0.25s;
  68. }
  69. .cube:nth-child(6) {
  70. animation-delay: 0.3s;
  71. }
  72. .cube:nth-child(7) {
  73. animation-delay: 0.35s;
  74. }
  75. .cube:nth-child(8) {
  76. animation-delay: 0.4s;
  77. }
  78. .cube:nth-child(9) {
  79. animation-delay: 0.45s;
  80. }
  81. @keyframes anim {
  82. 50% {
  83. transform: translateZ(0.5em);
  84. }
  85. }
  86. </style>
  87. <script type="module" crossorigin src="./assets/index-94991f0a.js"></script>
  88. <link rel="stylesheet" href="./assets/index-b7b2ffb7.css">
  89. </head>
  90. <body>
  91. <div id="loadingPage">
  92. <div class='base'>
  93. <div class='cube'></div>
  94. <div class='cube'></div>
  95. <div class='cube'></div>
  96. <div class='cube'></div>
  97. <div class='cube'></div>
  98. <div class='cube'></div>
  99. <div class='cube'></div>
  100. <div class='cube'></div>
  101. <div class='cube'></div>
  102. </div>
  103. </div>
  104. <div id="app"></div>
  105. </body>
  106. </html>