设置博客园标题样式
Posted hbyang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了设置博客园标题样式相关的知识,希望对你有一定的参考价值。
添加CSS样式
我们在【管理】-->【设置】-->【博客设置】-->【页面定制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); }
复制完成后保存。
以上是关于设置博客园标题样式的主要内容,如果未能解决你的问题,请参考以下文章