Blueherb In solitude, where we are least alone

博客园cnblogs:自定义页面风格

这篇笔记仅作为记录,以防以后忘记。 CSS 很简单,也没有用 JS 代码,尽管如此,若有人能够参考,那是再好不过的了。

在 “管理 -> 设置” 打开“修改设置”页面,在其中修改

用浏览器的“审核元素”之类的,找到标签对应的 #id , .class ,然后添加 CSS 代码。

  • 页面定制CSS代码
    /* css file : https://www.cnblogs.com/blog/customcss/166538.css?v=o6NlMnWKH5%2bK9ejEqSVjT7TiC3A%3d */
 
body {
    font-family: “Courier New”,"Bitstream Vera Sans Mono",MONACO,Consolas,"DejaVu Sans Mono",monospace,Arial,sans-serif;
    margin: 0;
    background-image: url(//www.cnblogs.com/skins/BlueSky/images/bg.gif);
    background-repeat: repeat;
    background-color: #FFFDFA;
}
a {
    color: #3399FF;
    font-weight: inherit;
    line-height: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
h1, .post h1 {
    font-size: 24px;
}
h2, #cnblogs_post_body h2 {
    font-size: 22px;
}
h3, #cnblogs_post_body h3 {
    font-size: 20px;
}
h4, #cnblogs_post_body h4 {
    font-size: 18px;
}
h5, #cnblogs_post_body h5 {
    font-size: 16px;
}
#home {
    
}
#header {
    background-color: #2d94de;
    height: 35px;
    width: 100%;
}
#blogTitle {
    display: none;
}
#navigator {
    left: 0;
    right: 0;
    margin: 0 0 0 0;
    position: relative;
}
#navList {
    list-style: none outside none;
    display: block;
    float: left;
    left: 0;
    right: 0;
    margin: 0 10px 0 20px;
    position: relative;
}
#navList li {
    float: left;
    margin-right: 25px;
    margin-top: 8px;
    display: inline;
}
#navList li a {
    background-color: #2d94de;
    font-size: 16px;
    text-decoration: none;
    color: #FFF;
    padding: 7px 10px;
}
#navList li a:hover {
    background-color: #2175bc;
}
.blogStats {
    float: right;
    color: #ddd;
    margin: 9px 60px 8px 0px;
    text-align: right;
    padding: 0;
    font-size: 14px;
}
#main{
    min-width: 950px;
    text-align: left;
    margin: 20px;
}
#mainContent {
    min-height: 200px;
    padding: 0px 0px 10px 0;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    overflow: hidden;
    word-break: break-all;
    float: right;
    margin-left: -290px;
    width: 100%;
}

#mainContent .forFlow {
    margin-left: 290px;
    float: none;
    width: auto;
    margin-top: 10px;
}
.day {
    min-height: 10px;
    _height: 10px;
    margin: 10px 0px;
}
.dayTitle {
    border-bottom: 1px solid #DDDDDD;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    padding-bottom: 4px;
    text-align: right;
    font-size: 14px;
    display: none;
}
.dayTitle a {
    color: #333;
}
.postTitle, .entrylistPosttitle {
    padding-right: 64px;
    padding-left: 10px;
    border-left-width: 3px;
    border-left-style: solid;
    border-left-color: #2175bc;
    font-size: 120%;
    font-weight: bold;
    line-height: 1.5;
    width: 100%;
    color: #444;
    margin: 0px 0px;
}
#mainContent #post_detail .postTitle {
    padding-left: 15px;
    font-size: 24px;
    margin: 10px 0px 23px 0px;
    color: #111;
}
.postTitle a, .entrylistPosttitle a {
    color: #000;
}
.postTitle a:hover, .entrylistPosttitle a:hover {
    color: #3399ff;
    text-decoration: none;
}
#mainContent #post_detail .postTitle a, #mainContent #post_detail .postTitle a:hover {
    color: #111;
    text-decoration: none;
}
.postCon, .entrylistPostSummary {
    float: right;
    line-height: 1.5;
    width: 100%;
    clear: both;
    padding: 13px 0;
    font-size: 15px;
}
.postBody {
    line-height: 1.5;
    width: 100%;
    font-size: 16px;
}
.postDesc, .entrylistItemPostDesc {
    float: right;
    width: 100%;
    clear: both;
    text-align: right;
    padding-right: 5px;
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}
.day  .postDesc, .entrylist .entrylistItemPostDesc {
    border-bottom: 1px solid #DDDDDD;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    padding-bottom: 4px;
}
.postSeparator {
	clear: both;
}
#post_detail #blog_post_info_block, #comment_form {
    font-size: 13px;
}

#sideBar {
    width: 250px;
    min-height: 200px;
    padding: 9px 9px 9px 5px;
    float: left;
    -o-text-overflow: ellipsis;
    text-overflow: ellipsis;
    overflow: hidden;
    word-break: break-all;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 20px;
    min-height: 20px;
    font-size: 15px;
}
#newsSideBar .headImage {
    padding: auto;
}
#newsSideBar .headImage img {
    border: 3px solid #2586d7;
    border-radius: 50%;
    width: 150px;
    margin: auto;
    display: block;
}
#sideBarMain .newsItem .catListTitle, #sidebar_scorerank {
    display: none;
}
.newsItem #profile_block {
    padding: 0px 10px 0px 40px;
}
#blog-sidecolumn .catListTitle {
    font-size: 15px;
    padding-left: 15px;
    padding-bottom: 2px;
    font-weight: bold;
    font-family: Arial;
    margin: 15px 0px 8px 0px;
    color: #666;
    border-bottom: 1px solid #ccc;
}
#blog-sidecolumn #sidebar_search .input_my_zzk {
    width: 170px;
}
#blog-sidecolumn ul {
    margin-top: 10px;
    list-style:none;
}
#blog-sidecolumn li {
    margin-bottom: 4px;
}
#blog-sidecolumn #sidebar_recentposts .catListEssay ul, #blog-sidecolumn #sidebar_topviewedposts #TopViewPostsBlock ul {
    padding:0px;
    font-size: 13px;
}

.topicListFooter a {
    font-weight: bold;
    font-size: 17px;
}
#pageBeginBar{
    background-color: rgb(255,255,255,0.1);
    height: 90px;
}
#pageBeginTitle {
    background-color: rgb(255,255,255,0.1);
    padding: 18px 20px 18px 70px;
    text-align: left;
    float: left
}
#pageBeginTitle a, #pageBeginTitle a:hover {
    color: #000;
    text-decoration: none;
    font-size: 30px;
    font-weight: bold;
    padding: 10px 15px 8px 15px;
    display: block;
    float: left;
    outline: none
}
#pageBeginTitle span {
    font-size: 16px;
    font-weight: bold;
    display: block;
    float: left;
    padding: 22px 20px 13px 10px;
}
#footer {
    text-align: center;
    min-height: 25px;
    _height: 25px;
    border-top: 1px solid black;
    margin-top: 10px;
    padding-top: 10px;
    padding-bottom:35px;
    font-size: 14px;
}
#pageEnd {
    width: 100%;
    height: 200px;
    background-color: #2d94de;
    background-image: url(//www.cnblogs.com/skins);
    display: none;
}
.entrylistTitle {
    font-size: 23px;
    margin: 5px auto;
}
.entrylistDescription {
    font-size: 15px;
    padding: 5px 0px 5px 20px;
    color: #555;
    border-bottom: 1px dashed #666;
    margin: 0px 0px 25px 0px;
}
  • 博客侧边栏公告(支持HTML代码)(申请JS权限)
<div id="newsSideBar">
    <div class="headImage">
        <img src="https://pic.cnblogs.com/avatar/575699/20180820225915.png" alt="头像">
    </div>
</div>
  • 页首Html代码
<div id="pageBeginBar">
    <div id="pageBeginTitle">
	<a href="https://www.cnblogs.com/blueherb/">Blueherb</a>
        <span>In solitude, where we are least alone</span>
        <div class="clear"></div>
    </div>
 

</div>
  • 页脚Html代码
<div id="pageEnd">
&nbsp;
</div>

 


 

  • 在“公告”栏添加一些有趣的模块

(来自:https://www.cnblogs.com/houkai/p/3394402.html)

添加访问次数:
首先要在http://www.amazingcounters.com/index.php网站注册,它会自动生成相应代码,然后粘贴到公告框中即可

**访问来源位置: **
通过http://www.clustrmaps.com/zh/admin/action.php生成访问者地址分布图,然后将代码添加到公告框中即可,注意博客园默认只支持HTML代码,JS代码会忽略。

动态时间,代码如下:

<object id="honehoneclock" width="160" height="70" align="middle" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param value="always" name="allowScriptAccess">
<param value="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.swf" name="movie">
<param value="high" name="quality">
<param value="#ffffff" name="bgcolor">
<param value="transparent" name="wmode">
<embed width="160" height="70" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="always" name="honehoneclock" bgcolor="#ffffff" quality="high" src="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.swf" wmode="transparent">
</object>

第四行中http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.swf是时间Flash的网址,http://chabudai.sakura.ne.jp/blogparts/honehoneclock/下还有一些时间Flash,大家可选择。

网上还有很多时间的Flash代码,比如:

<embed width="180" height="180" align="middle" wmode="transparent" quality="high" src="http://images.cnblogs.com/cnblogs_com/csharp/clock.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">

大家还可以添加更多模块,比如天气、广告什么的。如果你发现别人博客中的模块比较漂亮,那么那就研究下那部分的HTML源码吧(FireBug或审查元素)。当然,简洁也是一种美,适度最好了。

posted @ 2018-08-23 21:24  Blueherb  阅读(2478)  评论(0编辑  收藏  举报