【博客管理】博客优化之三签名优化

一。中国风样式:

参考:https://www.cnblogs.com/keerdi/p/6141461.html

复制代码
<div id="AllanboltSignature">
    <p id="PSignature" style="border: #330066 1px solid;
        padding:10px 10px;
        background: url(http://pics.sc.chinaz.com/files/pic/psd1/201410/psd14407.jpg) #FAFAFA no-repeat 0 50%;
        background-size:100px;
        font-family: 微软雅黑; font-size:11px;">
        <span style="margin-left:10px;font-weight:bold;">作者:<a style="text-decoration:none;color:blue" href="http://www.cnblogs.com/haochuang/" target="_blank">念槐聚</a> —— <b style="color:red">产品规划设计 项目管理 测试质量 过程改进 从0到1 从1到∞...</b></span>
        <br /><br />
        <span style="margin-left:10px;font-weight:bold;">出处:<a style="text-decoration:none;color:blue" href="http://www.cnblogs.com/haochuang/" target="_blank">http://www.cnblogs.com/haochuang/</a></span>
        <br /><br />
        <span style="margin-left:10px;font-weight:bold;color:red;">本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。</span>
    </p>
</div>
复制代码

样式:

 

二.添加打赏码

参考:https://www.cnblogs.com/mq0036/p/7048716.html

求打赏的签名吧,支付宝求打赏签名测试代码:

在设置页面的左边菜单“博客签名”使用的代码:

复制代码
<!-- 支付宝遮罩 -->
<div class="div_masklayer" id="div_masklayer"></div>
<div class="div_popup" id="Div_popup"> <img class="img_zfb" id="img_zfb" src="https://files.cnblogs.com/files/haochuang/zhifubao.bmp">
  <p class="mid">您的资助是我最大的动力!<br>金额随意,欢迎来赏!</p>
  <!-- 欢迎资助我持续写作,金额随意,欢迎来赏! -->
</div>

<!-- 签名 -->
<div class="autograph">
  <p> <span style="display: none"> 如果,您认为阅读这篇博客让您有些收获,不妨点击一下右下角的<a id="btnRecommendMyBlog">【<strong>推荐</strong>】</a>按钮。<br>
    </span> 如果,您希望更容易地发现我的新博客,不妨点击一下绿色通道的<a id="guanzhuwo">【<strong>关注我</strong>】</a>。</p>
  <div class="blogds">如果,想给予我更多的鼓励,<span class="bold">求打</span> <a class="btn_donate" style="position: absolute" id="btn_donate" title="Donate 打赏" target="_self"></a> </div>
  <p>因为,我的写作热情也离不开您的肯定支持,感谢您的阅读,我是【<strong>念槐聚</strong>】!</p>
</div>
复制代码

 

在博客园后台设置-->页面定制CSS代码

复制代码
<style type="text/css">
    
* {
    margin:0;
    padding:0;
}
html {
    _background:url(about:blank);
} /**//* 阻止闪动 in IE6 , 把空文件换成about:blank , 减少请求 */
body {
    background:#fff;
    font: 12px/1.5 Tahoma, Geneva, \\5b8b\\4f53, sans-serif;
    height:100%;
}
.custom_hide {
    display: none;
}
.mid {
    font-size:18px;
    font-weight:bold;
    color:#f9f;
    text-align:center;
    vertical-align:top;
    line-height:24px;
}
/**//** 遮罩层 **/ 
.div_masklayer {
    background:#000;
    display:none;
    filter:alpha(opacity = 50);
    opacity:0.5;
    top:0;
    left:0;
    height:100%;
    width:100%;
    z-index:999;
    position:fixed;
    _position:absolute;
_left: expression(documentElement.scrollLeft + documentElement.clientWidth - this.offsetWidth);
_top: expression(documentElement.scrollTop + documentElement.clientHeight - this.offsetHeight);
}
/**//** 弹出层 **/ 
.div_popup {
    display:none;
    width:300px;
    z-index:1000;
    background:#0aa;
    left:50%;
    top:50%;
    position:fixed!important;
    margin-left:-150px !important;
    _position:absolute;
_top:expression(eval(document.compatMode && document.compatMode=='CSS1Compat')? documentElement.scrollTop + (document.documentElement.clientHeight - this.offsetHeight)/2: /**//*IE6*/ 
document.body.scrollTop + (document.body.clientHeight - this.clientHeight)/2); /**//*IE5 IE5.5*/
}
/*图片样式*/
.img_zfb {
    width:100%;
    height:100%;
}
/*签名*/
.autograph {
    padding: 15px;
    background-color: #FFF7DC;
    border: 2px solid #FFBFBF;
    font-family:"Courier New", 微软雅黑, Consolas, Arial, 宋体;
}
.custom_hide {
    display: none;
}
.blogds {
    height:82px;
    line-height:82px;
}
a.btn_donate {
    display: inline-block;
    width: 82px;
    height: 82px;
    background: url("https://files.cnblogs.com/files/haochuang/btn_reward.gif") no-repeat;
    _background: url("https://files.cnblogs.com/files/haochuang/btn_reward.gif") no-repeat;
    -webkit-transition: background 0s;
    -moz-transition: background 0s;
    -o-transition: background 0s;
    -ms-transition: background 0s;
    transition: background 0s;
}
a.btn_donate:hover {
    cursor:pointer;
    background-position: 0px -82px;
    background-color:unset !important;
}
.bold {
    font-weight: bold;
}

    
</style>
复制代码

我们在设置页面-->页脚Html代码

复制代码
<script type="text/javascript">
// 博客签名脚本 //
    function btn_donateClick() {
        var DivPopup = document.getElementById('Div_popup');
        var DivMasklayer = document.getElementById('div_masklayer');
        DivMasklayer.style.display = 'block';
        DivPopup.style.display = 'block';
        var h = Div_popup.clientHeight;
        with (Div_popup.style) {
            marginTop = -h / 2 + 'px';
        }
    }

    function MasklayerClick() {

        var masklayer = document.getElementById('div_masklayer');
        var divImg = document.getElementById("Div_popup"); 
        masklayer.style.display = "none";
        divImg.style.display = "none";
    }

    setTimeout(
        function () {
            document.getElementById('div_masklayer').onclick = MasklayerClick;
            document.getElementById('btn_donate').onclick = btn_donateClick;
            var a_gzw = document.getElementById("guanzhuwo");
            a_gzw.href = "javascript:void(0);";
            $("#guanzhuwo").attr("onclick","follow('33513f9f-ba13-e011-ac81-842b2b196315');");
        }, 900);


</script>
复制代码

加完之后,刷新一下,在看看你的每一篇博文的最后,是否已经加上了自己的签名了 ^_^

 

 

样式:

 

posted @   念槐聚  阅读(277)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
历史上的今天:
2012-05-08 [收藏链接]经济相关
2012-05-08 [转载学习]所谓股市理论
2012-05-08 [收藏学习]赚钱定律
点击右上角即可分享
微信分享提示