Browse Source

动画修改

黄琪勇 10 tháng trước cách đây
mục cha
commit
8bbe7d2771
2 tập tin đã thay đổi với 22 bổ sung20 xóa
  1. 22 20
      index.html
  2. BIN
      public/loading.gif

+ 22 - 20
index.html

@@ -39,7 +39,7 @@
       },
     })
   </script>
-  
+
   <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
   <script>
     // VConsole will be exported to `window.VConsole` by default.
@@ -47,7 +47,7 @@
   </script>
 
   <style>
-    #lottieWeb {
+    #lottieWeb,.lottieWeb{
       position: fixed;
       z-index: 100;
       top: 50%;
@@ -62,27 +62,29 @@
 </head>
 
 <body>
-  <div id="app"></div>
+  <div id="app">
+    <img class="lottieWeb" src="./loading.gif" alt="">
+  </div>
   <div id="lottieWeb"></div>
   <script>
-    lottie.loadAnimation({
-      container: document.getElementById('lottieWeb'),
-      renderer: 'svg',
-      width: '30px',
-      height: '30px',
-      loop: true,
-      autoplay: true,
-      path: '/orchestra-music-score/loading.json'
-    });
-    window.addEventListener('load', function () {
-      const loadingEle = document.getElementById('lottieWeb')
-      loadingEle.style.opacity = '0'
-      setTimeout(() => {
-        loadingEle.style.display = 'none'
-      }, 1000)
-    })
+    // lottie.loadAnimation({
+    //   container: document.getElementById('lottieWeb'),
+    //   renderer: 'svg',
+    //   width: '30px',
+    //   height: '30px',
+    //   loop: true,
+    //   autoplay: true,
+    //   path: '/orchestra-music-score/loading.json'
+    // });
+    // window.addEventListener('load', function () {
+    //   const loadingEle = document.getElementById('lottieWeb')
+    //   loadingEle.style.opacity = '0'
+    //   setTimeout(() => {
+    //     loadingEle.style.display = 'none'
+    //   }, 1000)
+    // })
   </script>
   <script type="module" src="/src/subpages/colexiu/main.ts"></script>
 </body>
 
-</html>
+</html>

BIN
public/loading.gif