chesszhang 6 роки тому
батько
коміт
a4ede03a4e
2 змінених файлів з 26 додано та 3 видалено
  1. 3 3
      cat.html
  2. 23 0
      test.html

+ 3 - 3
cat.html

@@ -22,7 +22,8 @@
     bottom: -70px;
   }
 </style>
-<script type="text/javascript" src="/live2d/device.min.js"></script>
+<script type="text/javascript" src="./live2d/device.min.js"></script>
+<script type="text/javascript" src="./live2d/script.js"></script>
 <script type="text/javascript">
 const loadScript = function loadScript(c,b){var a=document.createElement("script");a.type="text/javascript";"undefined"!=typeof b&&(a.readyState?a.onreadystatechange=function(){if("loaded"==a.readyState||"complete"==a.readyState)a.onreadystatechange=null,b()}:a.onload=function(){b()});a.src=c;document.body.appendChild(a)};
 (function(){
@@ -31,9 +32,8 @@ const loadScript = function loadScript(c,b){var a=document.createElement("script
     document.getElementById("live2dcanvas").style.height = '150px';
   }else
     if (typeof(device) === 'undefined') console.error('Cannot find current-device script.');
-  loadScript("/live2d/script.js", function(){loadlive2d("live2dcanvas", "/live2d/assets/hijiki.model.json", 0.5);});
+  loadScript("./live2d/script.js", function(){loadlive2d("live2dcanvas", "./live2d/assets/hijiki.model.json", 0.5);});
 })();
 </script>
-<script type="text/javascript" src="/live2d/script.js"></script>
 </body>
 </html>

+ 23 - 0
test.html

@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta http-equiv="X-UA-Compatible" content="ie=edge">
+  <title>Document</title>
+</head>
+<body>
+  <script>
+    var iframe = document.createElement('iframe');
+    iframe.src = 'http://zhangzhanyu.nfreehost.com/cat.html';
+    iframe.id = 'catIframe';
+    iframe.frameBorder = 0;
+    document.getElementById('blog-news').appendChild(iframe);
+  </script>
+  <style>
+    #catIframe {
+      position: fixed;
+    }
+  </style>
+</body>
+</html>