统一博客样式

从这篇博文(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 @ 2015-04-29 12:16  圣骑士wind  阅读(275)  评论(0编辑  收藏  举报