在网站内加入一个Live2D看板娘,让页面更有趣生动。建议小白使用插件版本,更方便。
一、WordPress
直接下载戴兜的小屋插件使用
https://daidr.me/archives/code-176.html

2233娘的 Live2D 看板娘插件
https://github.com/xb2016/poster-girl-l2d-2233
二、Typecho
直接下载保罗的小宇宙插件使用
https://github.com/Dreamer-Paul/Pio
注意将插件文件夹重命名为 Pio,Pio看板api已关闭,故在Plugin.php第42行,取消调用paul_update自动检测更新函数

三、手动构建
Github下载压缩包:https://github.com/ixixii/KanBanMusume
解压到网站路径,header.php文件中添加以下代码
<link rel="stylesheet" href="/live2d/css/live2d.css" />
<script type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.js"></script>
在footer.php文件中body结束标签之前,添加以下代码
<div id="landlord">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="280" height="250" class="live2d"></canvas>
<div class="hide-button">隐藏</div>
<div class="switch-button">换装</div>
</div>
<script type="text/javascript">
var message_Path = '/live2d/'
var home_Path = 'http://vwhm.net' //此处修改为你的域名,必须带斜杠
</script>
<script type="text/javascript" src="/live2d/js/live2d.js"></script>
<script type="text/javascript" src="/live2d/js/message.js"></script>
<script type="text/javascript">
var index = Math.ceil(Math.random()*37)
loadlive2d("live2d", "/live2d/model/pio/model_"+index+".json");
</script>
四、参考文章
1、戴兜的小屋-PoiLive2D – 为你的博客添加一个看板娘
2、保罗的小宇宙-给你的博客增加动态看板娘
3、未闻花名-WordPress博客添加看板娘(送37套服饰)
附
件
下
载
文件名称:Live2d插件
适用版本:HTML
更新日期:2025-01-06
文件大小:8M
提示:遇问题或链接失效请联系站长,本站欢迎捐赠!

Invitation
QQ Group
1095632335
created:04/01/2020
Welcome to the Group
Use this card to join us and participate in a pleasant discussion together .
Welcome to JISHUSONGSHU Group,wish you a nice day .


![[WordPress]懒加载插件a3 Lazy Load [WordPress]懒加载插件a3 Lazy Load](https://img.szfx.top/img/2022/10/a3-Lazy-Load-banner.png)


![[WordPress]免费夜间模式插件DarkLooks [WordPress]免费夜间模式插件DarkLooks](https://img.szfx.top/img/2022/09/darklooks.gif)
