博客美化—添加萌萌的live2D看板娘(不能再簡單了)

看着很多博客都有live2D的萌萌噠看板娘,我閒着有空說幹就幹。

  1. 從參考博客的附件中下載資源文件
  • waifu.css
  • waifu-tips.js
  • live2d.js
  • flat-ui.min.css//若不加菜單可以不引入
  1. 上傳資源文件到博客園
  2. 申請js權限
  3. 設置博客園頁腳Html代碼(其中的資源文件可以替換成你自己的url)

頁腳Html代碼

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="https://blog-static.cnblogs.com/files/lgjbky/waifu.css"/>
    <link rel="stylesheet" type="text/css" href="https://blog-static.cnblogs.com/files/lgjbky/flat-ui.min.css"/>
</head>
<body>    
    <div class="waifu">
        <div class="waifu-tips"></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://blog-static.cnblogs.com/files/lgjbky/waifu-tips.js"></script>
    <script src="https://blog-static.cnblogs.com/files/lgjbky/live2d.js"></script>
    <script type="text/javascript">initModel()</script>
</body>
</html>

參考

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章