只需要复制以下代码,覆盖到你的index.html中即可:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1.0">
  6. <title>loading</title>
  7. <style>
  8. html,
  9. body,
  10. #app {
  11. height: 100%;
  12. margin: 0px;
  13. padding: 0px;
  14. }
  15. .chromeframe {
  16. margin: 0.2em 0;
  17. background: #ccc;
  18. color: #000;
  19. padding: 0.2em 0;
  20. }
  21. #loader-wrapper {
  22. position: fixed;
  23. top: 0;
  24. left: 0;
  25. width: 100%;
  26. height: 100%;
  27. z-index: 999999;
  28. }
  29. #loader {
  30. display: block;
  31. position: relative;
  32. left: 50%;
  33. top: 50%;
  34. width: 150px;
  35. height: 150px;
  36. margin: -75px 0 0 -75px;
  37. border-radius: 50%;
  38. border: 3px solid transparent;
  39. /* COLOR 1 */
  40. border-top-color: #FFF;
  41. -webkit-animation: spin 2s linear infinite;
  42. /* Chrome, Opera 15+, Safari 5+ */
  43. -ms-animation: spin 2s linear infinite;
  44. /* Chrome, Opera 15+, Safari 5+ */
  45. -moz-animation: spin 2s linear infinite;
  46. /* Chrome, Opera 15+, Safari 5+ */
  47. -o-animation: spin 2s linear infinite;
  48. /* Chrome, Opera 15+, Safari 5+ */
  49. animation: spin 2s linear infinite;
  50. /* Chrome, Firefox 16+, IE 10+, Opera */
  51. z-index: 1001;
  52. }
  53. #loader:before {
  54. content: "";
  55. position: absolute;
  56. top: 5px;
  57. left: 5px;
  58. right: 5px;
  59. bottom: 5px;
  60. border-radius: 50%;
  61. border: 3px solid transparent;
  62. /* COLOR 2 */
  63. border-top-color: #FFF;
  64. -webkit-animation: spin 3s linear infinite;
  65. /* Chrome, Opera 15+, Safari 5+ */
  66. -moz-animation: spin 3s linear infinite;
  67. /* Chrome, Opera 15+, Safari 5+ */
  68. -o-animation: spin 3s linear infinite;
  69. /* Chrome, Opera 15+, Safari 5+ */
  70. -ms-animation: spin 3s linear infinite;
  71. /* Chrome, Opera 15+, Safari 5+ */
  72. animation: spin 3s linear infinite;
  73. /* Chrome, Firefox 16+, IE 10+, Opera */
  74. }
  75. #loader:after {
  76. content: "";
  77. position: absolute;
  78. top: 15px;
  79. left: 15px;
  80. right: 15px;
  81. bottom: 15px;
  82. border-radius: 50%;
  83. border: 3px solid transparent;
  84. border-top-color: #FFF;
  85. /* COLOR 3 */
  86. -moz-animation: spin 1.5s linear infinite;
  87. /* Chrome, Opera 15+, Safari 5+ */
  88. -o-animation: spin 1.5s linear infinite;
  89. /* Chrome, Opera 15+, Safari 5+ */
  90. -ms-animation: spin 1.5s linear infinite;
  91. /* Chrome, Opera 15+, Safari 5+ */
  92. -webkit-animation: spin 1.5s linear infinite;
  93. /* Chrome, Opera 15+, Safari 5+ */
  94. animation: spin 1.5s linear infinite;
  95. /* Chrome, Firefox 16+, IE 10+, Opera */
  96. }
  97. @-webkit-keyframes spin {
  98. 0% {
  99. -webkit-transform: rotate(0deg);
  100. /* Chrome, Opera 15+, Safari 3.1+ */
  101. -ms-transform: rotate(0deg);
  102. /* IE 9 */
  103. transform: rotate(0deg);
  104. /* Firefox 16+, IE 10+, Opera */
  105. }
  106. 100% {
  107. -webkit-transform: rotate(360deg);
  108. /* Chrome, Opera 15+, Safari 3.1+ */
  109. -ms-transform: rotate(360deg);
  110. /* IE 9 */
  111. transform: rotate(360deg);
  112. /* Firefox 16+, IE 10+, Opera */
  113. }
  114. }
  115. @keyframes spin {
  116. 0% {
  117. -webkit-transform: rotate(0deg);
  118. /* Chrome, Opera 15+, Safari 3.1+ */
  119. -ms-transform: rotate(0deg);
  120. /* IE 9 */
  121. transform: rotate(0deg);
  122. /* Firefox 16+, IE 10+, Opera */
  123. }
  124. 100% {
  125. -webkit-transform: rotate(360deg);
  126. /* Chrome, Opera 15+, Safari 3.1+ */
  127. -ms-transform: rotate(360deg);
  128. /* IE 9 */
  129. transform: rotate(360deg);
  130. /* Firefox 16+, IE 10+, Opera */
  131. }
  132. }
  133. #loader-wrapper .loader-section {
  134. position: fixed;
  135. top: 0;
  136. width: 51%;
  137. height: 100%;
  138. background: #1ABC9C;
  139. /* Old browsers */
  140. z-index: 1000;
  141. -webkit-transform: translateX(0);
  142. /* Chrome, Opera 15+, Safari 3.1+ */
  143. -ms-transform: translateX(0);
  144. /* IE 9 */
  145. transform: translateX(0);
  146. /* Firefox 16+, IE 10+, Opera */
  147. }
  148. #loader-wrapper .loader-section.section-left {
  149. left: 0;
  150. }
  151. #loader-wrapper .loader-section.section-right {
  152. right: 0;
  153. }
  154. /* Loaded */
  155. .loaded #loader-wrapper .loader-section.section-left {
  156. -webkit-transform: translateX(-100%);
  157. /* Chrome, Opera 15+, Safari 3.1+ */
  158. -ms-transform: translateX(-100%);
  159. /* IE 9 */
  160. transform: translateX(-100%);
  161. /* Firefox 16+, IE 10+, Opera */
  162. -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  163. transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  164. }
  165. .loaded #loader-wrapper .loader-section.section-right {
  166. -webkit-transform: translateX(100%);
  167. /* Chrome, Opera 15+, Safari 3.1+ */
  168. -ms-transform: translateX(100%);
  169. /* IE 9 */
  170. transform: translateX(100%);
  171. /* Firefox 16+, IE 10+, Opera */
  172. -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  173. transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
  174. }
  175. .loaded #loader {
  176. opacity: 0;
  177. -webkit-transition: all 0.3s ease-out;
  178. transition: all 0.3s ease-out;
  179. }
  180. .loaded #loader-wrapper {
  181. visibility: hidden;
  182. -webkit-transform: translateY(-100%);
  183. /* Chrome, Opera 15+, Safari 3.1+ */
  184. -ms-transform: translateY(-100%);
  185. /* IE 9 */
  186. transform: translateY(-100%);
  187. /* Firefox 16+, IE 10+, Opera */
  188. -webkit-transition: all 0.3s 1s ease-out;
  189. transition: all 0.3s 1s ease-out;
  190. }
  191. /* JavaScript Turned Off */
  192. .no-js #loader-wrapper {
  193. display: none;
  194. }
  195. .no-js h1 {
  196. color: #222222;
  197. }
  198. #loader-wrapper .load_title {
  199. font-family: 'Open Sans';
  200. color: #FFF;
  201. font-size: 19px;
  202. width: 100%;
  203. text-align: center;
  204. z-index: 9999999999999;
  205. position: absolute;
  206. top: 60%;
  207. opacity: 1;
  208. line-height: 30px;
  209. }
  210. #loader-wrapper .load_title span {
  211. font-weight: normal;
  212. font-style: italic;
  213. font-size: 13px;
  214. color: #FFF;
  215. opacity: 0.5;
  216. }
  217. </style>
  218. </head>
  219. <body>
  220. <!-- built files will be auto injected -->
  221. <div id="app">
  222. <div id="loader-wrapper">
  223. <div id="loader"></div>
  224. <div class="loader-section section-left"></div>
  225. <div class="loader-section section-right"></div>
  226. <div class="load_title">正在加载中...
  227. <br>
  228. <span>V1.0.1</span>
  229. </div>
  230. </div>
  231. </div>
  232. </body>
  233. </html>