diff --git a/autoload.js b/autoload.js index ed08ab3..965ba16 100644 --- a/autoload.js +++ b/autoload.js @@ -1,4 +1,5 @@ const live2d_path = "https://cdn.jsdelivr.net/gh/stevenjoezhang/live2d-widget/"; +//const live2d_path = "./"; $("").attr({href: live2d_path + "waifu.css", rel: "stylesheet", type: "text/css"}).appendTo("head"); //waifu.css的绝对路径 @@ -19,7 +20,7 @@ $.ajax({ }); //waifu-tips.js的绝对路径 -//初始化看板娘,会自动加载指定目录下的 waifu-tips.json +//初始化看板娘,会自动加载指定目录下的waifu-tips.json $(window).on("load", function() { initWidget(live2d_path + "waifu-tips.json", "https://live2d.fghrsh.net/api"); }); diff --git a/demo.html b/demo.html index a4ae46e..007b7cd 100755 --- a/demo.html +++ b/demo.html @@ -5,9 +5,32 @@ Live2D 看板娘 / Demo + - + + + diff --git a/waifu.css b/waifu.css index 719353b..f527825 100755 --- a/waifu.css +++ b/waifu.css @@ -1,14 +1,13 @@ #waifu { position: fixed; - bottom: 0; + bottom: -3px; left: 0; z-index: 1; line-height: 0; - transition: transform .3s ease-in-out; - transform: translateY(3px); + transition: bottom .3s ease-in-out; } #waifu:hover { - transform: translateY(0); + bottom: 0; } @media (max-width: 768px) { #waifu { @@ -31,11 +30,7 @@ text-overflow: ellipsis; overflow: hidden; position: absolute; - animation-delay: 5s; - animation-duration: 50s; - animation-iteration-count: infinite; - animation-name: shake; - animation-timing-function: ease-in-out; + animation: shake 50s ease-in-out 5s infinite; } #waifu #live2d { position: relative;