如何在你的博客养一只猫
Lan
2020-05-12 15:39
1159 人阅读
0 条评论
效果在图的左下角
将下列代码插入到你的网页之中就可以啦。
- <script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script>
- <script>
- L2Dwidget.init({
- "model": {
- jsonPath: "https://unpkg.com/live2d-widget-model-hijiki/assets/hijiki.model.json",<!--这里改模型,前面后面都要改-->
- "scale": 1
- },
- "display": {
- "position": "left",<!--设置看板娘的上下左右位置-->
- "width": 100,
- "height": 200,
- "hOffset": 0,
- "vOffset": 0
- },
- "mobile": {
- "show": true,
- "scale": 0.5
- },
- "react": {
- "opacityDefault": 0.7,<!--设置透明度-->
- "opacityOnHover": 0.2
- }
- });
- window.onload = function(){
- $("#live2dcanvas").attr("style","position: fixed; opacity: 0.7; left: 70px; bottom: 0px; z-index: 1; pointer-events: none;")
- }
- </script>
left是调整距离左边多远
bottom调整距离底部多远
源码转载于网络,如有问题请联系:Vast@tom.com
赞赏