日志篇 博客园的下方的女孩透明的,带点击声音的

首先要去申请开通js页面.一般来说没什么问题都会开通给你.

 

小女孩的动画

我发现这个动画的好像比图片的卡,导致了编辑随笔会卡...

博客侧边栏公告(支持HTML代码) (支持 JS 代码)

<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script> 
<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.0.min.js"></script> 
<script>
  L2Dwidget.init({ 
  "model": {jsonPath:"https://unpkg.com/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json","scale": 1 }, 
  "display": { "position": "left", "width": 100, "height": 200,"hOffset": 0, "vOffset": -20 }, 
  "mobile": { "show": true, "scale": 0.5 }, 
  "react": { "opacityDefault": 0.2, "opacityOnHover": 0.2 } });
</script>
View Code

 

页首 HTML 代码

<!-- 背景动画 -->
<script type="text/javascript" color="0,0,255" opacity='0.7' zIndex="10000" count="50000" src="https://files.cnblogs.com/files/lfri/canvas-nest.js"></script>
View Code

 

目录配置

当前皮肤是: LesslslMore

之后一切从简了,但是需要文章目录...

页面定制 CSS 代码 

<style type="text/css">
    #cnblogs_post_body
    {
        color: black;
        font: 0.875em/1.5em "微软雅黑" , "PTSans" , "Arial" ,sans-serif;
        font-size: 17px;
    }
   /*标题1*/
#cnblogs_post_body h1 {
    color: #fff;
    padding-left: 15px;
    background-color: #6FA833 !important;
    text-shadow: 2px 2px 3px #222222;
    font-family: "微软雅黑" , "宋体" , "黑体" ,Arial;
    margin-bottom: 5px;
}
/*标题2*/
#cnblogs_post_body h2 {
    color: #6FA833;
    border-left: 13px solid #6FA833;
    padding: 5px;
    background-color: #f5f5f5;
}
</style>
View Code

 

博客侧边栏公告(支持HTML代码) (支持 JS 代码) 

<!-- 目录索引列表生成 -->
<script language="javascript" type="text/javascript">

function GenerateContentList()
{
    if ($('#cnblogs_post_body').length == 0) { return; }
    var jquery_h1_list = $('#cnblogs_post_body h1');
    var jquery_h2_list = $('#cnblogs_post_body h2');
    var jquery_h3_list = $('#cnblogs_post_body h3');

    if (jquery_h1_list.length != 0)
    {
        var content = '<a name="_labelTop"></a>';
        content    += '<div id="navCategory">';
        content    += '<p style="font-size:18px"><b>目录</b></p>';
        content += '<ul class="first_class_ul">';

        for (var i = 0; i < jquery_h1_list.length; i++)
        {
            var go_to_top = '<div style="text-align: right"><a href="#_labelTop">返回目录</a><a name="_label' + i + '"></a></div>';
            $(jquery_h1_list[i]).before(go_to_top);
            var li_content = '<li><a href="#_label' + i + '">' + $(jquery_h1_list[i]).text() + '</a></li>';
            var nextH1Index = i + 1;
            if (nextH1Index == jquery_h1_list.length) { nextH1Index = 0; }
            var jquery_h2_list = $(jquery_h1_list[i]).nextUntil(jquery_h1_list[nextH1Index], "h2");
            if (jquery_h2_list.length > 0)
            {
                li_content += '<ul class="second_class_ul">';
            }
            for (var j = 0; j < jquery_h2_list.length; j++)
            {
                var go_to_top2 = '<div style="text-align: right"><a href="#_labelTop">返回目录</a><a name="_lab2_'+ i + '_' + j + '"></a></div>';
                $(jquery_h2_list[j]).before(go_to_top2);
                li_content +='<li><a href="#_lab2_'+ i +'_' + j + '">' + $(jquery_h2_list[j]).text() + '</a></li>';
                var nextH2Index = j + 1;
                var next;
                if (nextH2Index == jquery_h2_list.length) 
                {
                    if (i + 1 == jquery_h1_list.length)
                    {
                        next = jquery_h1_list[0];
                    }
                    else
                    {
                        next = jquery_h1_list[i + 1];
                    }
                }
                else
                {
                    next = jquery_h2_list[nextH2Index];
                }
                var jquery_h3_list = $(jquery_h2_list[j]).nextUntil(next, "h3");
                if (jquery_h3_list.length > 0)
                {
                    li_content += '<ul class="third_class_ul">';
                }
                for (var k = 0; k < jquery_h3_list.length; k++)
                {
                    var go_to_third_Content = '<div style="text-align: right"><a href="#_labelTop">返回目录</a><a name="_label3_' + i + '_' + j + '_' + k + '"></a></div>';
                    $(jquery_h3_list[k]).before(go_to_third_Content);
                    li_content += '<li><a href="#_label3_' + i + '_' + j + '_' + k + '">' + $(jquery_h3_list[k]).text() + '</a></li>';
                }               
                if (jquery_h3_list.length > 0)
                {
                    li_content += '</ul>';
                }
                li_content += '</li>';
            }
            if (jquery_h2_list.length > 0)
            {
                li_content +='</ul>';
            }
            li_content +='</li>';
            content += li_content;
        }
        content    += '</ul>';
        content    += '</div>';
    }
    else if (jquery_h2_list.length != 0)
    {
        var content = '<a name="_labelTop"></a>';
        content    += '<div id="navCategory">';
        content    += '<p style="font-size:18px"><b>目录</b></p>';
        content    += '<ul class="second_class_ul">';
        for(var i =0; i < jquery_h2_list.length; i++)
        {
            var go_to_top2 = '<div style="text-align: right"><a href="#_labelTop">返回目录</a><a name="_lab2_'+ i + '_' + j + '"></a></div>';
            $(jquery_h2_list[j]).before(go_to_top2);
            var li_content = '<li><a href="#_lab' + i + '">' + $(jquery_h2_list[i]).text() + '</a></li>';
            var nextH1Index = i + 1;
            if (nextH1Index == jquery_h2_list.length) { nextH1Index = 0; }
            var jquery_h3_list = $(jquery_h2_list[i]).nextUntil(jquery_h2_list[i+1], "h3");
            if(jquery_h3_list.length>0)
            {
                li_content +='<ul class="third_class_ul">';
            }
            for(var j = 0;j < jquery_h3_list.length;j++)
            {                  
                var go_to_third_Content = '<div style="text-align: right"><a href="#_labelTop">返回目录</a><a name="_label3_' + i + '_' + j + '_' + k + '"></a></div>';
                $(jquery_h3_list[k]).before(go_to_third_Content);
                li_content +='<li><a href="#_lab2'+ i +'_' + j + '">' + $(jquery_h3_list[j]).text() + '</a></li>';
            }
            if(jquery_h3_list.length>0)
            {
                li_content +='</ul>';
            }
            li_content +='</li>';
            content += li_content;
        }
        content    += '</ul>';
        content    += '</div>'; 
    }
    else if (jquery_h3_list.length != 0) 
    {
        var content = '<a name="_labelTop"></a>';
        content    += '<div id="navCategory">';
        content    += '<p style="font-size:18px"><b>目录</b></p>';
        content    += '<ul>';
        for(var i = 0; i < jquery_h3_list.length; i++)
        {
            var go_to_third_Content = '<div style="text-align: right"><a href="#_labelTop">返回目录</a><a name="_label3_' + i + '_' + j + '_' + k + '"></a></div>';
            $(jquery_h3_list[k]).before(go_to_third_Content);
            var li_content = '<li><a href="#_label' + i + '">' + $(jquery_h3_list[i]).text() + '</a></li>';
            content += li_content;
        }
        content    += '</ul>';
        content    += '</div>';
    }
    else
    {
        return;
    }
$($('#cnblogs_post_body')[0]).prepend(content);
}
GenerateContentList();
</script>
View Code

 

 

 

(完)

posted @ 2020-11-14 14:54  惊惊  阅读(242)  评论(0编辑  收藏  举报