zoukankan      html  css  js  c++  java
  • 美化博客园(比较完整版)

    设置与我联系

    侧边栏公告代码

    <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=xxxxxxxxxxx&amp;site=qq&amp;menu=yes">
      <img align="absmiddle" border="0" src="http://wpa.qq.com/pa?p=2:xxxxxxxxxxxx:41 &amp;r=0.30709030851721764" alt="欢迎与我联系" title="欢迎与我联系">
    </a>

    将xxxxx部分改为你QQ号即可

    设置标题样式

    页面定制CSS代码

    #cnblogs_post_body
    {
        color: black;      
        font: 0.875em/1.5em "微软雅黑" , "PTSans" , "Arial" ,sans-serif;
        font-size: 15px;
    }
    #各个等级标题的颜色样式
    #cnblogs_post_body h1    {
        background: #2B6695;
        border-radius: 6px 6px 6px 6px;
        box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
        color: #FFFFFF;
        font-family: "微软雅黑" , "宋体" , "黑体" ,Arial;
        font-size: 23px;
        font-weight: bold;
        height: 25px;
        line-height: 25px;
        margin: 18px 0 !important;
        padding: 8px 0 5px 5px;
        text-shadow: 2px 2px 3px #222222;
    }
    #cnblogs_post_body h2    {
        background: #008eb7;
        border-radius: 6px 6px 6px 6px;
        box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
        color: #FFFFFF;
        font-family: "微软雅黑" , "宋体" , "黑体" ,Arial;
        font-size: 20px;
        font-weight: bold;
        height: 25px;
        line-height: 25px;
        margin: 18px 0 !important;
        padding: 8px 0 5px 5px;
        text-shadow: 2px 2px 3px #222222;
    }
    #cnblogs_post_body h3    {
        background: #399ab2;
        border-radius: 6px 6px 6px 6px;
        box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
        color: #FFFFFF;
        font-family: "微软雅黑" , "宋体" , "黑体" ,Arial;
        font-size: 18px;
        font-weight: bold;
        height: 25px;
        line-height: 25px;
        margin: 18px 0 !important;
        padding: 8px 0 5px 5px;
        text-shadow: 2px 2px 3px #222222;
    }
    #cnblogs_post_body h4{
        background: #2B6600;
        border-radius: 6px 6px 6px 6px;
        box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
        color: #FFFFFF;
        font-family: "微软雅黑" , "宋体" , "黑体" ,Arial;
        font-size: 16px;
        font-weight: bold;
        height: 24px;
        line-height: 23px;
        margin: 12px 0 !important;
        padding: 5px 0 5px 10px;
        text-shadow: 2px 2px 3px #222222;
    }
    #页面中a标签鼠标位置
    #cnblogs_post_body h2:a{
       color: rgb(235, 235, 235);
    }
    #cnblogs_post_body h2 a:hover{
       color: rgb(255, 102, 0);
    }
    #页面中标题位置
    #cnblogs_post_body h1{
       color: rgb(235, 235, 235);
    }
    #cnblogs_post_body h1:hover{
       color: rgb(255, 102, 0);
    }
    #cnblogs_post_body h2{
       color: rgb(235, 235, 235);
    }
    #cnblogs_post_body h2:hover{
       color: rgb(255, 102, 0);
    }
    #cnblogs_post_body h3{
       color: rgb(235, 235, 235);
    }
    #cnblogs_post_body h3:hover{
       color: rgb(255, 102, 0);
    }
    #cnblogs_post_body h4{
       color: rgb(235, 235, 235);
    }
    #cnblogs_post_body h4:hover{
       color: rgb(255, 102, 0);
    }

    设置打赏

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

    <script src="http://static.tctip.com/tctip-1.0.0.min.js"></script>
      <script>  
      new tctip({
        top: '20%',
        button: {
          id: 9,
          type: 'dashang',
        },
        list: [      {        type: 'alipay',        qrImg: 'xxxxxxx路径'      }, {        type: 'wechat',        qrImg: 'xxxxxxxxx路径'      }    ]
      }).init()
      </script>

     将上面的xxxx路径改为收款二维码路径即可。(只对文章生效,随笔不生效。)

    添加快速置顶小火箭

    页首Html代码

    <!--添加快速置顶小火箭-->
    <style>
    #back-top {
         position: fixed;
         bottom: 10px;
         right: 5px;
         z-index: 99;
    }
    #back-top span {
         width: 50px;
         height: 64px;
         display: block;
         background:url(http://images.cnblogs.com/cnblogs_com/seanshao/855033/o_rocket.png) no-repeat center center;
    }
    #back-top a{outline:none}
    </style>
    <script type="text/javascript">
    $(function() {
        // hide #back-top first
        $("#back-top").hide();
        // fade in #back-top
        $(window).scroll(function() {
            if ($(this).scrollTop() > 500) {
                $('#back-top').fadeIn();
            } else {
                $('#back-top').fadeOut();
            }
        });
        // scroll body to 0px on click
        $('#back-top a').click(function() {
            $('body,html').animate({
                scrollTop: 0
            }, 800);
            return false;
        });
    });
    </script>
    <p id="back-top" style="display:none"><a href="#top"><span></span></a></p>

    设置爱心特效

    博客侧边栏公告代码

    <!-- 爱心特效 -->
    <script type="text/javascript">
    
    (function(window,document,undefined){
            var hearts = [];
            window.requestAnimationFrame = (function(){
                    return window.requestAnimationFrame || 
                               window.webkitRequestAnimationFrame ||
                               window.mozRequestAnimationFrame ||
                               window.oRequestAnimationFrame ||
                               window.msRequestAnimationFrame ||
                               function (callback){
                                       setTimeout(callback,1000/60);
                               }
            })();
            init();
            function init(){
                    css(".heart{ 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: ''; inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: absolute;}.heart:after{top: -5px;}.heart:before{left: -5px;}");
                    attachEvent();
                    gameloop();
            }
            function gameloop(){
                    for(var i=0;i<hearts.length;i++){
                        if(hearts[i].alpha <=0){
                                document.body.removeChild(hearts[i].el);
                                hearts.splice(i,1);
                                continue;
                        }
                        hearts[i].y--;
                        hearts[i].scale += 0.004;
                        hearts[i].alpha -= 0.013;
                        hearts[i].el.style.cssText = "left:"+hearts[i].x+"px;top:"+hearts[i].y+"px;opacity:"+hearts[i].alpha+";transform:scale("+hearts[i].scale+","+hearts[i].scale+") rotate(45deg);background:"+hearts[i].color;
                }
                requestAnimationFrame(gameloop);
            }
            function attachEvent(){
                    var old = typeof window.onclick==="function" && window.onclick;
                    window.onclick = function(event){
                            old && old();
                            createHeart(event);
                    }
            }
            function createHeart(event){
                var d = document.createElement("div");
                d.className = "heart";
                hearts.push({
                        el : d,
                        x : event.clientX - 5,
                        y : event.clientY - 5,
                        scale : 1,
                        alpha : 1,
                        color : randomColor()
                });
                document.body.appendChild(d);
        }
        function css(css){
                var style = document.createElement("style");
                    style.type="text/css";
                    try{
                        style.appendChild(document.createTextNode(css));
                    }catch(ex){
                        style.styleSheet.cssText = css;
                    }
                    document.getElementsByTagName('head')[0].appendChild(style);
        }
            function randomColor(){
                    return "rgb("+(~~(Math.random()*255))+","+(~~(Math.random()*255))+","+(~~(Math.random()*255))+")";
            }
    })(window,document);
    
    </script>

    添加个人图像

    <img src="xxxxxxxxxxxxxx图片路径" alt="个人图像" class="img_avatar" width="250px" style="border-radius:50%">

     添加分享功能

    博客侧边栏公告代码

    更加自己的喜好进行设计:http://share.baidu.com/

    <script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"6","bdPos":"right","bdTop":"400"},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"16"}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

    签名美化 

    页面定制css代码

    /* 设置签名格式 */
    #MySignature {
        display: none;
        background-color: #B2E866;
        border-radius: 10px;
        box-shadow: 1px 1px 1px #6B6B6B;
        padding: 10px;
        line-height: 1.5;
        text-shadow: 1px 1px 1px #FFF;
        font-size: 16px;
        font-family: 'Microsoft Yahei';
    }

    推荐及反对 

    页面定制css代码

    #div_digg{
      position:fixed;
      bottom:5px;
      140px;
      right:30px;
      border:2px solid #085;
      padding:10px;
      background-color:#fff;
      opacity:0.3;
      border-radius:5px 5px 5px 5px !important;
      box-shadow:0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
      transition-duration: 0.5s;
    }
    #div_digg:hover{
      opacity:1;
    }

    添加时钟 

    博客侧边栏公告

    <div id="clockdiv">
    <canvas id="dom" width="200" height="200">您的浏览器不兼容canvas</canvas>
    </div>
    <script type="text/javascript" src="https://files.cnblogs.com/files/siwuxie095/clock.js"></script>

     统计访问人数

    <font color=#0099ff size=3 face="STCAIYUN">访问人数:<div align="center"><a href="http://www.amazingcounters.com"><img border="0" 
    src="http://cc.amazingcounters.com/counter.php?i=3217947&c=9654154" alt="AmazingCounters.com"></a></div>
    <font color=###7CFC00 size=3 face="STCAIYUN">总访问量:</font><div align="center"><a href="http://www.amazingcounters.com"><img border="0" 
    src="http://cc.amazingcounters.com/counter.php?i=3217942&c=9654139" alt="AmazingCounters.com"></a></div>

     使背景带雪花效果

    页首Html代码

    <!--使背景带雪花效果-->
    <canvas id="c_n9" width="1920" height="990" style="position: fixed; top: 0px; left: 0px; z-index: -1; opacity: 0.5;"></canvas>
    <script src="https://files.cnblogs.com/files/siwuxie095/canvas-nest.min.js"></script>
  • 相关阅读:
    根据一个class,对改class 建一个内表
    将一个内表中的数据,读取到structure中。不用loop循环.
    sap gui中打断点,进入不了断点
    使用python 写一个 股票涨跌提醒功能
    windows使用方法
    mathType插入公式编号,及对公式编号的字体进行修改。调整公式上下间距。
    notefirst使用
    word自动导入目录
    杀死正在运行的进程: linux
    win10系统电脑调节屏幕亮度选项无法显示
  • 原文地址:https://www.cnblogs.com/HByang/p/9348123.html
Copyright © 2011-2022 走看看