自定义博客园
博客主题: Another001
页面定制css代码:
/*添加按钮,copy*/
.cnblogs-markdown pre {
position: relative;
}
.cnblogs-markdown pre > span {
position: absolute;
top: 0;
right: 0;
border-radius: 2px;
padding: 0 10px;
font-size: 12px;
background: rgba(0, 0, 0, 0.4);
color: #fff;
cursor: pointer;
}
.cnblogs-markdown pre > .copyed {
background: #67c23a;
}
/*markdown > */
#cnblogs_post_body blockquote {
border: none;
border-left: 10px solid #E6E6E6; /*左边大小和颜色*/
margin-left: 20px;
padding-left: 10px; /* 左边文字距离*/
padding-right: 163px;
}
#top {
background-color: #bdc3c7;
height:50px;
vertical-align: middle;
color: #ccc;
padding-left: 10px;
}
#sub {
background-color: #ddd;
color: #ccc;
}
/*去掉推送*/
#ad_t2{/*广告*/
display: none;/*设置框架不显示*/
overflow: hidden;/*框架超出部分隐藏*//*下同*/
}
#cnblogs_c1{/*空白块1*/
display: none;
overflow: hidden;
}
#cnblogs_c2{/*空白块2*/
display: none;
overflow: hidden;
}
#under_post_news{/*相关博文*/
display: none;
overflow: hidden;
}
#under_post_kb{/*最新新闻*/
display: none;
overflow: hidden;
}
/*删除div*/
#green_channel{/*好文要顶*/
display: none;/*设置框架不显示*/
overflow: hidden;/*框架超出部分隐藏*//*下同*/
}
#author_profile{/*作者信息*/
display: none;/*设置框架不显示*/
overflow: hidden;/*框架超出部分隐藏*//*下同*/
}
#MySignature {
display: none;
background-color: #cacfd2;
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';
}
/* 定制公告栏文字信息 */
.gonggao{
text-align: center;
font-size:17px;
color:blue;
}
.wenzi{
text-align: center;
font-size:15px;
}
/* 定制博客背景图片,url里面是你的图片位置信息 */
body {
/*background-color: #efefef;*/
background-image:url(https://tuchuang001.com/images/2017/06/16/ie-die1.jpg);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center 0;
background-size: cover;
padding-top:0px;
opacity:0.9;
}
/* 定制推荐和反对按键 */
#div_digg{
position:fixed;
bottom:-10px;
width:120px;
right:20px;
box-shadow: 0 0 6px #0000FF;
border:2px solid #FF0000;
padding:4px;
background-color:#fff;
border-radius:4px 4px 4px 4px !important;
}
.icon_favorite {
background: transparent url('http://images.cnblogs.com/cnblogs_com/shwee/1218109/o_kj.gif') no-repeat 0 0;
padding-left: 15px;
}
#blog_post_info_block a {
text-decoration: none;
color: #5B9DCA;
padding: 3px;
}
/*评论栏*/
.commentform .comment_textarea {
width: 100%!important;
height: 200px!important;
border: 1px solid #eef2f8;
border-radius: 6px;
padding: 5px;
font-family: inherit;
font-size: 15px;
resize: none;
box-sizing: border-box;
background-color: transparent;
color: #314659;
}
div.commentform textarea.comment_textarea {
line-height: 1.6;
}
.commentform .comment_textarea:hover {
border-color: #2D8CF0;
}
博客侧边栏公告
<script type="text/javascript">
$(document).ready(function () {
var pres = $("pre");
for (var i = 0; i < pres.length; i++) {
$(pres[i]).attr('id', 'pre' + i);
//这里注释掉
//$(pres[i]).children('code').hide();
//这里原来是view code,改为hide code
$(pres[i]).prepend('<button id="btn'+ i +'" onclick="view_code(\'pre'+ i +'\');">hide code</button>');
}
});
function view_code (id) {
var btn_text = document.getElementById(id).children[0].innerText;
var style;
var status;
if(btn_text == 'view code') {
style = '""';
status = 'hide code';
} else {
style = 'display: none;';
status = 'view code';
}
document.getElementById(id).children[0].innerText = status;
document.getElementById(id).children[1].style = style;
}
</script>
参考博客:
页面风格: https://www.cnblogs.com/shwee/p/9060226.html
代码折叠: https://www.cnblogs.com/Vaxy/p/11409465.html
复制代码: https://www.cnblogs.com/wuliytTaotao/p/11752754.html