统一博客样式

从这篇博文(http://www.cnblogs.com/mengdd/p/4463485.html)开始,以后再也不用写很多的内联样式了,只要规定文档级别和class即可.

之前的文章可能会有样式问题.

 

统一了博客样式:

复制代码
/*.postbody class是博文区域*/

#cnblogs_post_body h1 {
    font-size: 18pt;
    font-weight: bold;
    color: #0000ff;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

#cnblogs_post_body h2 {
    font-size: 18pt;
    font-weight: bold;
    margin-top: 5px;
    margin-left: 10px;
    margin-bottom: 5px;
    color: #3366ff;
}

#cnblogs_post_body h3 {
    font-size: 14pt;
    font-weight: bold;
    color: #000000;
    background-color: #ffff00;
    padding: 0;
    margin-top: 5px;
    margin-left: 10px;
    width: 30%;
    border: none;
    text-indent: 5px;
}

#cnblogs_post_body h4 {
    font-size: 12pt;
    font-weight: bold;
    padding: 0;
    margin-left: 15px;
}

.postbody body {
    font-size: 12pt;
}

.postbody a {
    color: #1d58d1;
}

#cnblogs_post_body div {
    font-size: 12pt;
    text-indent: 2em;
}

.postbody img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
/*source code保留原有样式*/

#cnblogs_post_body div.cnblogs_code,
#cnblogs_post_body .cnblogs_code div,
#cnblogs_post_body div.cnblogs_code_hide,
#cnblogs_post_body .cnblogs_code_hide div {
    font-size: 12px;
    text-indent: 0;
}

.postbody .cnblogs_code img {
    display: inline;
    margin: 0;
}
/*其他样式*/

.postbody .highlight {
    color: #ff0000;
    font-weight: bold;
}

.postbody .highlight-bg {
    background-color: #ffff00;
    font-weight: bold;
}

.box-content {
    border-radius: 5px;
    background-color: #E3F2FD;
    width: 80%;
    text-indent: 5px;
}
复制代码

 

posted @   圣骑士wind  阅读(275)  评论(0编辑  收藏  举报
编辑推荐:
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· Obsidian + DeepSeek:免费 AI 助力你的知识管理,让你的笔记飞起来!
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示