添加博客看板娘

需要js权限

添加模型文件:直接上传到博客的文件中

需要三个文件和一个可选文件

waifu.css(看板娘在页面的位置以及大小)

waifu-tips.js(看板娘的语言设置)

live2d.min.js(一些点击之后的动作)

*flat-ui.min.css(看板娘的选项 PS:右面的功能选项 )

 

代码实现

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Live2D</title>

    <link rel="stylesheet" type="text/css" href="https://files.cnblogs.com/files/saber9/waifu.css"/>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
</head>
<body>
    <link rel="stylesheet" type="text/css" href="https://files.cnblogs.com/files/saber9/waifu.css">
    <div class="waifu" id="waifu">
        <div class="waifu-tips" style="opacity: 1;"></div>
        <canvas id="live2d" width="280" height="250" class="live2d"></canvas>
        <div class="waifu-tool">
            <span class="fui-home"></span>
            <span class="fui-chat"></span>
            <span class="fui-eye"></span>
            <span class="fui-user"></span>
            <span class="fui-photo"></span>
            <span class="fui-info-circle"></span>
            <span class="fui-cross"></span>
        </div>
    </div>
    <script src="https://files.cnblogs.com/files/saber9/live2d.js"></script>
    <script src="https://files.cnblogs.com/files/saber9/waifu-tips.js"></script>
    <script type="text/javascript">initModel()</script>
</body>
</html>
<link rel="stylesheet" type="text/css" href="https://files.cnblogs.com/files/saber9/flat-ui.min.css"/>

PS:文件中的waifu1是设置看板娘放在右面的,也就是标红的两行,自行决定放左放右。

posted @ 2019-05-20 09:53  saber゛  Views(175)  Comments(0)    收藏  举报