zoukankan      html  css  js  c++  java
  • 关于我的博客园皮肤效果

    一些朋友和我要我的博客园的皮肤效果,其实我的效果也是参考一些大佬,复制粘贴过来的,哈哈哈哈哈,主要我个人比较喜欢二次元风格,如果有喜欢的朋友可以自取哈。

    在设置的侧边栏代码中插入我的代码就可以了(需要申请js权限)

    <script type="text/javascript">
            var a_idx = 0;
            jQuery(document).ready(function($) {
            $("body").click(function(e) {
            var a = new Array("❤喜欢就关注一下吧❤","❤不是点这里哦❤","❤快去点赞❤","❤在文章最下面哦❤","❤快去推荐一下吧❤","❤感谢观看❤","❤");
            var $i = $("<span></span>").text(a[a_idx]);
            a_idx = (a_idx + 1) % a.length;
            var x = e.pageX,
            y = e.pageY;
            $i.css({
                "z-index": 999999999999999999999999999999999999999999999999999999999999999999999,
                "top": y - 20,
                "left": x,
                "position": "absolute",
                "font-weight": "bold",
                "color": "rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"
            });
            $("body").append($i);
            $i.animate({
                "top": y - 180,
                "opacity": 0
            },
            1500,
            function() {
                $i.remove();
            });
        });
    });
    </script>
    

    页面定制 CSS 代码

    .git-link {
        z-index: 100;
        position: fixed;
        top: 0;
        right: 0;
        border: 0;
        height: 149px;
         149px;
        transform: rotate(90deg);
        -webkit-transform: rotate(90deg);
        -moz-transform: rotate(90deg);
        -o-transform: rotate(90deg);
        -ms-transform: rotate(90deg);
        background-image: url(//images2015.cnblogs.com/blog/459873/201603/459873-20160317090540131-1089895320.png);
    }
    
    
    
    /* 文章标题样式(这个不是markdown里的标题) */
    #topics .postTitle a {
        color: #828282;
        font-size: 36px;
    }
    
    /* 普通文字样式 */
    #cnblogs_post_body p {
        margin: 18px auto;
        color: #000;
        font-family: Consolas, "Microsoft YaHei", monospace;
        font-size: 18px;
        text-indent: 0;
    }
    
    .cnblogs-markdown code {
      padding: 0;
      padding-top: 0.2em;
      padding-bottom: 0.2em;
      margin: 0;
      font-size: 85%;
      background-color: rgba(0,0,0,0.04);
      border-radius: 3px;
      border: none !important;
      display: inline-block;
    }
    
    /* 标题样式 */
    #cnblogs_post_body h1 {
        font-family: Consolas, "Microsoft YaHei", monospace;
        font-size: 32px;
        font-weight: bold;
        line-height: 1.5;
        margin: 10px 0;
    }
    
    #cnblogs_post_body h2 {
        font-family: Consolas, "Microsoft YaHei", monospace;
        font-size: 26px;
        font-weight: bold;
        line-height: 1.5;
        margin: 20px 0;
    }
    
    #cnblogs_post_body h3 {
        font-family: Consolas, "Microsoft YaHei", monospace;
        font-size: 20px;
        font-weight: bold;
        line-height: 1.5;
        margin: 10px 0;
    }
    
    #cnblogs_post_body h4 {
        font-family: Consolas, "Microsoft YaHei", monospace;
        font-size: 18px;
        font-weight: bold;
        margin: 10px 0;
    }
    /* 标题样式设置结束 */
    
    /* 去除双下划线斜体样式 */
    em {
        font-style: normal;
        color: #000;
    }
    
    /* 无序列表 */
    #cnblogs_post_body ul li {
        font-family: Consolas, "Microsoft YaHei", monospace;
        color: #000;
        font-size: 16px;
        list-style-type: disc;
    }
    
    /* 有序列表 */
    #cnblogs_post_body ol li {
        font-family: Consolas, "Microsoft YaHei", monospace;
        color: #000;
        font-size: 16px;
        list-style-type: decimal;
    }
    
    /* 超链接 */
    #cnblogs_post_body a:link {
        text-decoration: none;
        color: #002C99;
    }
    
    /* 引用背景 */
    #topics .postBody blockquote {
        background: #f9e9f9;
        border: none;
        margin-bottom: 10px;
        padding: 2px 10px;
        border-left: 5px #CD6839 solid;
    }
    
    /* 单行代码 */
    .cnblogs-markdown code {
        font-family: Consolas, "Microsoft YaHei", monospace !important;
        font-size: 16px!important;
        color: #c7254e;
        line-height: 20px;
        background-color: #f9f2f4!important;
        padding: 0 5px!important;
        border: none;
        line-height: 1.5;
        margin: 1px 5px;
        vertical-align: middle;
        display: inline-block;
    }
    
    /* 多行代码, 引用 */
    .cnblogs-markdown .hljs {
        font-family: Consolas, "Microsoft YaHei", monospace !important;
        font-size: 16px!important;
        background-color: #dfecf0!important;
        line-height: 1.5!important;
        padding: 9px!important;
        border: none;
    }
    
    .cnblogs-markdown hr:before {
      display: table;
      content: "";
    }
    
    .cnblogs-markdown hr:after {
      display: table;
      clear: both;
      content: "";
    }
    /* 表格 */
    .cnblogs-markdown table {
      border: none;
       100%;
      overflow: auto;
      word-break: normal;
      word-break: keep-all;
      font-family: Consolas, "Microsoft YaHei", monospace !important;
      font-size: 16px!important;
    }
    /* 表格 表头 */
    .cnblogs-markdown table th {
      font-weight: bold;
    }
    /* 表格 行,列 */
    .cnblogs-markdown table th,
    .cnblogs-markdown table td {
      padding: 6px 13px;
      border: none;
    }
    
    .cnblogs-markdown table tr {
      background-color: #fff;
      border-top: none;
    }
    
    .cnblogs-markdown table tr:nth-child(2n) {
      background-color: #f8f8f8;
    }
    
    /*only for syntaxhighlighter */
    /*--start--*/
    .cnblogs-markdown .syntaxhighlighter table td.code {
      95% !important; 
    }
    
    .cnblogs-markdown p,
    .cnblogs-markdown blockquote,
    .cnblogs-markdown ul,
    .cnblogs-markdown ol,
    .cnblogs-markdown dl,
    .cnblogs-markdown table,
    .cnblogs-markdown pre {
      margin-top: 0;
      margin-bottom: 16px;
    }
    

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

    <script language="javascript" type="text/javascript">
    function GenerateContentList()
    {
        var mainContent = $('#cnblogs_post_body');
        var h2_list = $('#cnblogs_post_body h1');//如果你的章节标题不是h2,只需要将这里的h2换掉即可
        if(mainContent.length < 1)
            return;
     
        if(h2_list.length>0)
        {
            var content = '<a name="_labelTop"></a>';
            content += '<div id="navCategory">';
            content += '<p style="font-size:18px"><h1>阅读目录</h1></p>';
            content += '<ul>';
            for(var i=0; i<h2_list.length; i++)
            {
                var go_to_top = '<div style="text-align: right"><a href="#_labelTop">回到顶部</a><a name="_label' + i + '"></a></div>';
                $(h2_list[i]).before(go_to_top);
                
                var h3_list = $(h2_list[i]).nextAll("h2");
                var li3_content = '';
                for(var j=0; j<h3_list.length; j++)
                {
                    var tmp = $(h3_list[j]).prevAll('h1').first();
                    if(!tmp.is(h2_list[i]))
                        break;
                    var li3_anchor = '<a name="_label' + i + '_' + j + '"></a>';
                    $(h3_list[j]).before(li3_anchor);
                    li3_content += '<li><a href="#_label' + i + '_' + j + '">' + $(h3_list[j]).text() + '</a></li>';
                }
                
                var li2_content = '';
                if(li3_content.length > 0)
                    li2_content = '<li><a href="#_label' + i + '">' + $(h2_list[i]).text() + '</a><ul>' + li3_content + '</ul></li>';
                else
                    li2_content = '<li><a href="#_label' + i + '">' + $(h2_list[i]).text() + '</a></li>';
                content += li2_content;
            }
            content += '</ul>';
            content += '</div><p>&nbsp;</p>';
            //content += '<p style="font-size:18px"><b>正文</b></p>';
        }
        if($('#cnblogs_post_body').length != 0 )
        {
            $($('#cnblogs_post_body')[0]).prepend(content);
        }  
    }
    GenerateContentList();
    </script>
    
    <script type="text/javascript" color="0,0,255" opacity='0.7' zIndex="-2" count="99" src="https://files.cnblogs.com/files/lfri/canvas-nest.js"></script>
    
    
    <script type="text/javascript">
            var a_idx = 0;
            jQuery(document).ready(function($) {
            $("body").click(function(e) {
            var a = new Array("❤喜欢就关注一下吧❤","❤不是点这里哦❤","❤快去点赞❤","❤在文章最下面哦❤","❤快去推荐一下吧❤","❤感谢观看❤","❤");
            var $i = $("<span></span>").text(a[a_idx]);
            a_idx = (a_idx + 1) % a.length;
            var x = e.pageX,
            y = e.pageY;
            $i.css({
                "z-index": 999999999999999999999999999999999999999999999999999999999999999999999,
                "top": y - 20,
                "left": x,
                "position": "absolute",
                "font-weight": "bold",
                "color": "rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")"
            });
            $("body").append($i);
            $i.animate({
                "top": y - 180,
                "opacity": 0
            },
            1500,
            function() {
                $i.remove();
            });
        });
    });
    </script>
    
    <!-- 雪花 -->
    
    <script type="text/javascript">
       window.onload = function () {
                    var minSize = 15; //最小字体
                    var maxSize = 30;//最大字体
                    var newOne = 600; //生成雪花间隔
                    var flakColor = "#1bd3ff"; //雪花颜色
                    var flak = $("<div></div>").css({position:"absolute","top":"0px"}).html("❉");//定义一个雪花
                    var dhight = $(window).height(); //定义视图高度
                    var dw =$(window).width()-80; //定义视图宽度
                    setInterval(function(){
                    var sizeflak = minSize+Math.random()*maxSize; //产生大小不等的雪花
                    var startLeft = Math.random()*dw; //雪花生成是随机的left值
                    var startOpacity = 0.7+Math.random()*0.3; //随机透明度
                    var endTop= dhight-100; //雪花停止top的位置
                    var endLeft= Math.random()*dw; //雪花停止的left位置
                    var durationfull = 5000+Math.random()*3000; //雪花飘落速度不同
                    flak.clone().appendTo($("body")).css({
                    "left":startLeft ,
                    "opacity":startOpacity,
                    "font-size":sizeflak,
                    "color":flakColor
                    }).animate({
                    "top":endTop,
                    "left":endLeft,
                    "apacity":0.1
                    },durationfull,function(){
                    $(this).remove()
                    });
                    },newOne);
                }
     </script>
    
    
    <embed frameborder="no" border="0" marginwidth="0" marginheight="0" width=280 height=86 src="//music.163.com/outchain/player?type=2&id=730631&auto=0&height=66"></embed>
    
    <script charset="Shift_JIS" src="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.js">
    </script>
    
    <a class="git-link" href="https://github.com/kangyujian"></a>
    

    页首 HTML 代码

    <!-- 右下角live2d效果 -->
    <script type="text/javascript" charset="utf-8" async="" src="https://cdn.jsdelivr.net/npm/live2d-widget@3.0.4/lib/L2Dwidget.min.js"></script>
    

    页脚 HTML 代码

    <!-- 右下角live2d效果 -->
    <script type="text/javascript">
    setTimeout(() => {
            L2Dwidget.init({
                    "model": {
                            "scale": 0.5
                    },
                    "display": {
                            "position": "right",
                            "width": 180,
                            "height": 260,
                            "hOffset": 0,
                            "vOffset": -20
                    },
                    "mobile": {
                            "show": true,
                            "scale": 0.5
                    },
                    "react": {
                            "opacityDefault": 0.7,
                            "opacityOnHover": 0.2
                    }
            });
    }, 1000)
    </script>
    
    
  • 相关阅读:
    Android开源图表图形库K线图
    交易所8种作死方式
    Android百大框架排行榜
    15类Android通用流行框架
    如何避免Scrum敏捷开发团队反思会形式化,海星法介绍
    2018年Android面试题含答案--适合中高级
    FCoin优势
    golang学习笔记16 beego orm 数据库操作
    金融系统中加密机的简介
    ESB(Enterprise Service Bus)企业服务总线介绍
  • 原文地址:https://www.cnblogs.com/mengxiaoleng/p/13938807.html
Copyright © 2011-2022 走看看