直接粘贴以下代码(静态网页在_config.yml中添加,博客园在页尾html中加):linkrel=stylesheethref=https://cdn.jsdelivr.net/gh/Dreamer-Paul/Pio@2.4/static/pio.min.css/scriptasync=asyncsrc=https://c...
直接粘贴以下代码(静态网页在_config.yml中添加,博客园在页尾html中加):
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/Dreamer-Paul/Pio@2.4/static/pio.min.css"
/>
<script
async="async"
src="https://cdn.jsdelivr.net/combine/gh/Dreamer-Paul/Pio@2.4/static/l2d.min.js,gh/Dreamer-Paul/Pio@2.4/static/pio.min.js"
onl oad='
let pio_container = document.createElement("div");
pio_container.classList.add("pio-container");
pio_container.classList.add("right");
pio_container.style.bottom = "-2rem";
pio_container.style.zIndex = "1";
document.body.insertAdjacentElement("beforeend", pio_container);
let pio_action = document.createElement("div");
pio_action.classList.add("pio-action");
pio_container.insertAdjacentElement("beforeend", pio_action);
let pio_canvas = document.createElement("canvas");
pio_canvas.id = "pio";
pio_canvas.style.width = "14rem";
pio_canvas.width = "600";
pio_canvas.height = "800";
pio_container.insertAdjacentElement("beforeend", pio_canvas);
let pio = new Paul_Pio({
"mode": "fixed",
"hidden": true,
"content": {
"link": ["https:\/\/AbnerHung.github.io"],
"skin": ["要换成我的朋友吗?", "让她放个假吧~"],
"hidden": true,
},
"model": [
"https:\/\/cdn.jsdelivr.net/gh/xiaoski/live2d_models_collection/mikoto/mikoto.model.json",
"https:\/\/cdn.jsdelivr.net/gh/imuncle/live2d/model/tororo/tororo.model.json",
"https:\/\/cdn.jsdelivr.net/gh/imuncle/live2d/model/platelet-2/model.json",
"https:\/\/cdn.jsdelivr.net/gh/imuncle/live2d/model/xiaomai/xiaomai.model.json",
"https:\/\/cdn.jsdelivr.net/gh/imuncle/live2d/model/mashiro/seifuku.model.json",
"https:\/\/cdn.jsdelivr.net/gh/imuncle/live2d/model/Violet/14.json",
"https:\/\/cdn.jsdelivr.net/gh/xiaoski/live2d_models_collection/Kobayaxi/Kobayaxi.model.json",
"https:\/\/cdn.jsdelivr.net/gh/xiaoski/live2d_models_collection/uiharu/uiharu.model.json"
]
});'
></script>
模型以及js代码来源于网络~
沃梦达教程
本文标题为:用html代码给网页加个live2d看板娘吧
猜你喜欢
- 浅谈JavaScript的对象类型之function 2023-07-10
- JS中的常见数组遍历案例详解(forEach, map, filter, sort, reduce, every) 2023-07-10
- 如何使用整个html表更新数据库(PHP,MySQL) 2023-10-26
- css进阶学习 选择符 2022-11-13
- javascript – 如何通过AJAX将HTML5 sqlite结果集发送到服务器 2023-10-26
- Mac版本的Sublime Text如何安装px转rem,px自动rem转化 2023-08-29
- 探讨.get .post .ajax ztree 还有后台servlet传递数据的相关知识 2022-10-18
- ajax实现文件异步上传并回显文件相关信息功能示例 2023-02-15
- mint-ui如何自定义messageBox样式 2023-07-10
- Vue自学之路4-vue模版语法(v-clock) 2023-10-08