type

蓝色 2 级标题

页面定制 CSS 代码

#cnblogs_post_body h2 {
    background: none repeat scroll 0% 0% rgb(43, 102, 149);
    border-radius: 6px 6px 6px 6px;
    box-shadow: 0px 0px 0px 1px rgb(95, 90, 75), 1px 1px 6px 1px rgba(10, 10, 0, 0.5);
    color: rgb(255, 255, 255);
    font-family: "微软雅黑","宋体","黑体",Arial;
    font-size: 17px;
    font-weight: bold;
    height: 25px;
    line-height: 25px;
    margin: 15px 0px !important;
    padding: 5px 0px 5px 20px;
    text-shadow: 2px 2px 3px rgb(34, 34, 34);
    width: 98%;
}
#cnblogs_post_body h2 a{
   color: rgb(235, 235, 235);
}
#cnblogs_post_body h2 a:hover{
   color: rgb(255, 102, 0);
}

代码放缩

博客侧边栏 HTML

<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();
			$(pres[i]).prepend('<button id="btn'+ i +'" οnclick="view_code(\'pre'+ i +'\');">view 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>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值