1. 程式人生 > >博客園美化——看板娘

博客園美化——看板娘

ack 推薦 ont 實現 模型 pre ext ini xhtml

一直有人問我左下角的看板娘是怎麽加上去的

剛開始看別人的隨筆看得一臉懵逼,自己搗鼓個好久才弄好的

於是就想寫一篇容易看懂的隨筆

技術分享圖片技術分享圖片

1.下載模型相關文件(點擊推薦和關註才能下載哦QWQ

打開壓縮包後就是這麽一堆東西

技術分享圖片

2.將文件上傳到博客園

只要上傳

  • waifu.css
  • waifu-tips.js
  • live2d.js

技術分享圖片

3.代碼實現

<!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/kousak/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/kousak/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/kousak/live2d.js"></script>
    <script src="https://files.cnblogs.com/files/kousak/waifu-tips.js"></script>
    <script type="text/javascript">initModel()</script>
</body>
</html>
<link rel="stylesheet" type="text/css" href="https://files.cnblogs.com/files/yjlblog/flat-ui.min.css"/>

註意:將文件地址換成自己文件的地址

  

博客園美化——看板娘