仿百度官方空间的CSS模板

本文分享了一款基于LoveIsIntheAir风格的CSS皮肤修改方案,包括了首页、文章页及列表页等多页面元素的样式调整。
早上无聊的时候就随便玩玩。然后基于阿一的LoveIsIntheAir风格,仿百度官方空间的皮肤修改了一个CSS。修改的比较草率,有很多不足,见谅。

效果图:



CSS代码
/**//**************************************************
第一部分:所有的模板都使用的公共样式。公告样式是为了更好的向前和向后兼容。
如果不符合你皮肤的要求,你可以在后面通过更好的优先级覆盖着这些样式,但是
你不能删除这些样式。
*************************************************
*/

#EntryTag 
{}{
    margin-top
: 20px;
    font-size
: 12px;
    color
: gray;
}

.topicListFooter 
{}{
    text-align
: left;
    margin-right
: 10px;
    margin-top
: 10px;
    font-size
:14px;background:url(https://i-blog.csdnimg.cn/blog_migrate/09bfefbd467bed47e3bbd844259a7495.jpeg) no-repeat center left;line-height:40px;
}

.topicListFooter a
{}{color:#ffffff;font-size:14px;text-decoration:none; padding:5px 2px 5px 2px;background-color:#96BC17;margin-left:40px;}
.topicListFooter a:link
{}{color:#ffffff;text-decoration:none;padding:5px 2px 5px 2px}
.topicListFooter a:visited
{}{color:#ffffff;text-decoration:none;padding:5px 2px 5px 2px}

#divRefreshComments
{}{
    text-align
: right; 
    margin-right
: 10px;
    margin-bottom
: 5px;
    font-size
: 12px;
}

/**//*****第一部分结束*******************************/

/**//**************************************************
第二部:公共样式(全局样式)。公共会对所有页面的标签都起作用。这个部分你
可以随意的更改,并不会牵扯到其他的皮肤模板。但是每次更改都要注意你的皮肤
模板所有页面的变化。因为它们是全局的。
*************************************************
*/

{}{
    margin
: 0;
    padding
: 0;
}

html 
{}{
    height
: 100%;
}

body 
{}{
    color
: #000;
    background
: #FFF url(https://images.cnblogs.com/cnblogs_com/juxiaoqi/top.jpg) repeat-x top center;
    font-family
: "verdana","ms song","宋体","Arial","微软雅黑", "Helvetica", "sans-serif";
    font-size
: 9pt;
    min-height
: 101%;
}

table 
{}{
    border-collapse
: collapse;
    border-spacing
: 0;
}

fieldset, img 
{}{
    border
: 0;
}

ul 
{}{
    word-break
: break-all;
}

li 
{}{
    list-style
: none;
}

h1, h2, h3, h4, h5, h6 
{}{
    font-size
: 100%;
    font-weight
: normal;
}

a:link 
{}{
    color
: black;
    text-decoration
: none;
}

a:visited 
{}{
    color
: black;
    text-decoration
: none;
}

a:hover 
{}{
    color
: #FF3333;
    text-decoration
: underline;
}

a:active 
{}{
    color
: black;
    text-decoration
: none;
}

.clear 
{}{
    clear
: both;
}

/**//*****第二部分结束*******************************/

/**//**************************************************
第三部分:各个页面元素的样式。你可以根据需要随意的更改,并不会牵扯到其他
的皮肤模板。这个部分是最能展现你想象力的部分。其中头部和侧边栏部分是此皮
肤公共的部分。而每个页面特有的部分会有相应的注释和说明。
*************************************************
*/

/**//*****home和头部开始**************************/
#home 
{}{
    margin
: 0 auto;
    width
: 1002px;
    text-align
:left;
}

#header 
{}{
    height
:196px;
    background
:url(https://images.cnblogs.com/cnblogs_com/juxiaoqi/banner.jpg) no-repeat top center}

    padding-bottom: 5px;
}
#blogTitle 
{}{}
#blogTitle h1 
{}{
    font-size
: 26px;
    font-weight
: bold;
    line-height
: 1.5em;
    float
:left;
    position
:absolute;
    left
:60px;
    top
:45px;
}

#blogTitle h2 
{}{}
#blogTitle a
{}{color:#666666;}
#blogLogo 
{}{}
#navigator 
{}{margin-top:122px;*margin-top:109px;}
#navList 
{}{
    height
:25px;
    float
: left;
}

#navList li 
{}{
    display
:inline;
}

#navList a 
{}{
    display
: block;
    width
: 5em;
    height
:19px;
    _height
: 24px;
    float
: left;
    text-align
: center;
    padding-top
: 5px;
}

#navList a:link, #navList a:visited, #navList a:active 
{}{
    color
: #000000;
    font-size
:14px;
    text-decoration
: none;
}

#navList a:hover 
{}{
    color
: #000000;
    background-color
: #AAC132;
    font-size
:14px;
    text-decoration
: none;
}

a.aHeaderXML
{}{
    background
:transparent url('/Skins/LoveIsIntheAir/images/rss.gif') no-repeat center center;    
}

a.aHeaderXML img
{}{
    display
:none;
}

.blogStats 
{}{
    float
: right;
    color
: white;
    margin-top
: 5px;
    margin-right
: 2px;
    text-align
: right;
}

/**//*****home和头部结束**************************/

/**//*****主页文章列表开始**************************/
#topicList 
{}{
    width
: 740px;
    min-height
: 200px;
    padding
: 10px 5px 10px 10px;
    margin-top
:10px;
    float
: left;
    -o-text-overflow
: ellipsis;
    text-overflow
: ellipsis;
    overflow
: hidden;
    word-break
: break-all;
    border-right
:1px solid #DDDDDD;
}

.day 
{}{
    min-height
: 10px;
    _height
: 10px;
    margin-bottom
: 15px;
    padding-bottom
: 5px;
}

.dayTitle 
{}{
    width
: 740px;
    min-height
: 25px;
    _height
: 25px;
    font-weight
: bold;
    color
: #666;
    font-size
:14px;
    border-bottom
:1px solid #dddddd;
    margin-bottom
:5px;
    color
:#816D65;
}

.dayTitle a:link, .dayTitle a:visited, .dayTitle a:active
{}{
    color
:#816D65;
}

.postTitle 
{}{
    font-weight
: bold;
    line-height
: 1.5em;
    width
: 740px;
    font-size
:14px;
    min-height
: 25px;
    _height
: 25px;
}

.postTitle a:link, .postTitle a:visited, .postTitle a:active 
{}{
    color
: #444;
}

.postTitle a:hover 
{}{
    color
: #F60;
    text-decoration
: none;
}

.postCon 
{}{
    line-height
: 1.5em;
    width
: 740px;
    padding
: 10px 0;
    font-size
:14px;
}


.postDesc
{}{color:#669900;font-size:12px;margin-top:5px}
.postDesc a
{}{color:#669900;font-size:12px}
.postDesc a:visited
{}{color:#669900}

.postSeparator
{}{margin-top:17px;margin-bottom:17px;line-height:17px;border-top:1px solid #DDDDDD}

/**//*****主页文章列表开始**************************/

/**//*****侧边栏开始********************************/
#sideBar 
{}{
    width
:230px;
    _width
: 234px;
    min-height
: 200px;
    padding
: 10px 10px 5px 0;
    float
: right;
    -o-text-overflow
: ellipsis;
    text-overflow
: ellipsis;
    overflow
: hidden;
    word-break
: break-all;
}

.newsItem .catListTitle 
{}{
    display
: none;
}

.newsItem 
{}{
    padding
: 0 0 5px 0px;
    margin-bottom
: 8px;
    line-height
:170%;
}

#calendar 
{}{
    width
: 229px;
}

#calendar .Cal 
{}{
    width
: 100%;
    line-height
: 1.5em;
}

#calendar td,#calendar th
{}{
    font-size
:14px;
}

.Cal 
{}{
    border
: 0px solid black;
    color
: #96BC17;
}

.CalTitle 
{}{
    background
:white;
    color
: #96BC17;
    font-weight
:bold;
    height
:30px;
    text-align
:center;
    width
:100%;
}

.CalDayHeader
{}{
    color
:#96BC17;
    padding-bottom
:5px;
}

.CalNextPrev a:link, .CalNextPrev a:visited, .CalNextPrev a:active 
{}{
    font-weight
: bold;
    background-color
: white;
}

.CalNextPrev a:hover 
{}{
    font-weight
: bold;
    background-color
: #96BC17;
    color
:white;
}

#calendar table a:link, #calendar table a:visited, #calendar table a:active 
{}{
    font-weight
: bold;
    color
:#96BC17;
}

#calendar table a:hover 
{}{
    color
: #FFFFFF;
    text-decoration
: none;
    background-color
: #96BC17;
}

.CalWeekendDay
{}{
  color
:#96BC17;
    background
:#DDDDDD;
}

.CalTodayDay
{}{
    background
:url('/Skins/LoveIsIntheAir/images/bg_cal_today.gif') 50% 0 no-repeat;
    color
:#FFFFFF;
    background
:#96BC17;
}

.catListTitle 
{}{
    font-weight
: bold;
    min-height
:40px;
    *height
:40px;
    line-height
:40px;
    text-align
: left;
    margin-top
:10px;
    margin-bottom
: 10px;
    background
:url('/Skins/LoveIsIntheAir/images/bg_li.gif') left center no-repeat;
    padding-left
:35px;
    color
:#96BC17;
    font-size
:28px;
}

#leftcontentcontainer li
{}{
    font-size
:14px;
    line-height
:1.8em;
}

#leftcontentcontainer a
{}{
    color
:#816D65;
}

.catListComment 
{}{
    line-height
: 1.5em;
}

.divRecentComment 
{}{
    color
: #666;
}

#sideBarMain ul 
{}{
    line-height
: 1.5em;
}

/**//*****侧边栏结束********************************/


/**//****查看文章页面开始*************************/
#topics 
{}{
    -o-text-overflow
: ellipsis;
    text-overflow
: ellipsis;
    overflow
: hidden;
    word-break
: break-all;
}

#topics .postTitle 
{}{
    font-size
: 18px;
    font-weight
: bold;
    border-bottom
: 1px solid #999;
    float
: left;
    line-height
: 1.5em;
    width
: 100%;
    padding-left
: 5px;
    margin-bottom
:10px;
}

.postTitle
{}{font-size:14px;background:url(https://i-blog.csdnimg.cn/blog_migrate/09bfefbd467bed47e3bbd844259a7495.jpeg) no-repeat center left;line-height:40px;}
a.postTitle2
{}{color:#ffffff;font-size:14px;text-decoration:none; padding:5px 2px 5px 2px;background-color:#96BC17;margin-left:40px;}
a.postTitle2:link
{}{color:#ffffff;text-decoration:none;padding:5px 2px 5px 2px}
a.postTitle2:visited
{}{color:#ffffff;text-decoration:none;padding:5px 2px 5px 2px}
.postBody 
{}{
    padding
: 5px 2px 5px 5px;
    line-height
: 1.5em;
    color
: #000;
    font-size
:14px;
}

.postBody a:link, .postBody a:active,.postBody a:visited
{}{
    color
:black;
    text-decoration
:underline;
}

.postBody a:hover
{}{
    color
:#FF3333;
}

#EntryTag 
{}{
    font-size
: 9pt;
    color
: #666;
}

#EntryTag a 
{}{
    margin-left
: 5px;
}

#EntryTag a:link, #EntryTag a:visited, #EntryTag a:active 
{}{
    color
: #666;
}

#EntryTag a:hover 
{}{
    color
: #f60;
}

#topics .postDesc 
{}{
    float
: right;
    width
: 100%;
    text-align
: right;
    padding-right
: 5px;
    color
: #666;
    margin-top
: 5px;
}

.feedback_area_title 
{}{
    font-weight
: bold;
    margin-top
: 20px;
    padding-bottom
:5px;
    border-bottom
: 1px solid #333;
    margin-bottom
: 10px;
    padding-left
: 8px;
    font-size
:14px;
}

.feedbackListSubtitle 
{}{
    color
: #666;
}

.feedbackListSubtitle a:link, .feedbackListSubtitle a:visited, .feedbackListSubtitle a:active 
{}{
    color
: #37B1DF;
    font-weight
: normal;
}

.feedbackListSubtitle a:hover 
{}{
    color
: #FF3333;
    text-decoration
: none;
}

.feedbackManage 
{}{
    width
: 200px;
    text-align
: right;
    float
: right;
}

.feedbackManage a:link, .feedbackManage a:visited,.feedbackManage a:active
{}{
    color
:#333333;
}

.feedbackCon 
{}{
    border-bottom
: 1px solid #ccc;
    background
: url('/Skins/LoveIsIntheAir/images/comment.gif'') no-repeat 5px 0px;
    padding
: 15px 18px 10px 40px;
    min-height
: 35px;
    _height
: 35px;
    margin-bottom
: 1em;
    line-height
: 1.5em;
    width
:100%;
}

#divRefreshComments 
{}{
    text-align
: right;
    margin-bottom
: 10px;
}

.commenttb 
{}{
    width
: 320px;
}

#AjaxHolder_PostComment_divCommnentArea td
{}{
    font-size
:12px;
    padding
:3px;
}

#AjaxHolder_PostComment_divCommnentArea a:link,#AjaxHolder_PostComment_divCommnentArea a:visited,#AjaxHolder_PostComment_divCommnentArea a:active
{}{
    color
:#816D65;
}

/**//****查看文章页面开始*************************/

/**//****列表页面开始******************************/
.entrylistTitle 
{}{
    font-size
: 16px;
    font-weight
: bold;
    border-bottom
: 1px solid black;
    text-align
: left;
    padding-bottom
: 3px;
    padding-right
: 10px;
}

.entrylistDescription 
{}{
    color
: #666;
    text-align
: left;
    padding-top
: 5px;
    padding-bottom
: 5px;
    padding-right
: 10px;
    margin-bottom
: 10px;
}

.entrylistItem 
{}{
    min-height
: 20px;
    _height
: 20px;
    margin-bottom
: 30px;
    padding-bottom
: 5px;
    width
: 100%;
}

.entrylistPosttitle 
{}{
    font-size
: 11pt;
    font-weight
: bold;
    border-bottom
: 1px dashed #816D65;
    line-height
: 1.5em;
    width
: 100%;
    padding-left
: 5px;
}

.entrylistPosttitle a:hover 
{}{
    text-decoration
: none;
}

.entrylistPostSummary 
{}{
    margin-top
: 5px;
    padding-left
: 5px;
    margin-bottom
: 5px;
    font-size
:14px;
    line-height
:150%;
}

.entrylistItemPostDesc 
{}{
    text-align
: right;
    color
: #666;
}

.entrylistItemPostDesc a:link, .entrylistItemPostDesc a:visited, .entrylistItemPostDesc a:active 
{}{
    color
: #666;
}

.entrylistItemPostDesc a:hover 
{}{
    color
: #f60;
}

.entrylist .postSeparator 
{}{
    clear
: both;
    width
: 100%;
    font-size
: 0;
    line-height
: 0;
    margin
: 0;
    padding
: 0;
    height
: 0;
    border
: none;
}

.PostListTitle 
{}{
    font-size
: 11pt;
    font-weight
: bold;
    border-bottom
: 1px solid black;
    text-align
: right;
    padding-bottom
: 3px;
    padding-right
: 10px;
}

h1.PostListTitle
{}{
    text-align
:left;
    font-size
:18px;
}

.pager 
{}{
    text-align
: right;
    margin-right
: 10px;
}

.PostList 
{}{
    border-bottom
: 1px solid #ccc;
    clear
: both;
    min-height
: 1.5em;
    _height
: 1.5em;
    padding-top
: 10px;
    padding-left
: 5px;
    padding-right
: 5px;
    margin-bottom
: 5px;
}

.postTitl2 
{}{
    float
: left;
    font-size
:14px;
    line-height
:150%;
}

.postDesc2 
{}{
    color
: #666;
    float
: right;
    margin-right
: ;
}

.postText2 
{}{
    clear
: both;
    color
: #666;
    line-height
:150%;
}

#profile a,#profile a:link,#profile a:active,#profile a:visited
{}{
    color
:#816D65;
}

.pfl_feedback_area_title 
{}{
    text-align
: right;
    line-height
: 1.5em;
    font-weight
: bold;
    border-bottom
: 1px solid #666;
    margin-bottom
: 10px;
}

.pfl_feedbackItem 
{}{
    border-bottom
: 1px solid black;
    margin-bottom
: 20px;
}

.pfl_feedbacksubtitle 
{}{
    width
: 100%;
    border-bottom
: 1px dotted #666;
    height
: 1.5em;
    font-size
:14px;
}

.pfl_feedbackname 
{}{
    float
: left;
}

.pfl_feedbackManage 
{}{
    float
: right;
}

.pfl_feedbackCon 
{}{
    color
: black;
    padding-top
: 5px;
    padding-bottom
: 5px;
    line-height
:150%;
}

.pfl_feedbackAnswer 
{}{
    color
: #816D65;
    line-height
:150%;
    margin-bottom
:10px;
}

.tdSentMessage 
{}{
    text-align
: right;
}

.errorMessage 
{}{
    width
: 300px;
    float
: left;
}

.mySearch #q 
{}{
    height
: 1.4em;
    width
: 175px;
}

/**//****列表页面结束******************************/

/**//****相册页面开始******************************/
.divPhoto 
{}{
    border
: 1px solid #ccc;
    padding
: 2px;
    margin-right
: 10px;
}

.thumbTitle 
{}{
    font-size
: 16px;
    font-weight
: bold;
    border-bottom
: 1px solid black;
    text-align
: left;
    padding-bottom
: 3px;
    padding-right
: 10px;
}

.thumbDescription 
{}{
    color
: #666;
    text-align
: left;
    padding-top
: 5px;
    padding-bottom
: 5px;
    padding-right
: 10px;
    margin-bottom
: 10px;
}

/**//****相册页面开始******************************/


/**//*****留言页面开始*****************************/
#footer 
{}{
    text-align
: center;
    min-height
: 15px;
    _height
: 15px;
    border-top
: 1px solid black;
    margin-top
: 10px;
    padding-top
: 10px;
    margin-bottom
: 20px;
}

/**//*留言查看页面的个人信息*/
.personInfo 
{}{
    margin-bottom
: 20px;
}

/**//*留言分页区域*/
.pages 
{}{
    text-align
: right;
}

/**//*****留言页面结束*****************************/
/**//*****第三部分结束*******************************/

/**//**************************************************
第四部分:文章内容常用标签格式。这个部分是设置作者写作内容的部分。例如:
如果作者的文章用有p标签,则可通过这个对这些文章中的p标签进行设置。前面
的“.postBody”明确的指出了这里样式的作用范围。仅仅适用于文章主体部分。
建议这个不要设置过于详细的细节。因为,一些样式,一篇文章比较适合的话,
并不能保证所有的文章都适合。
*************************************************
*/

/**//*文章内部常用标签格式*/
.postBody 
{}{
    line-height
: 1.5em;
}

.postBody p,.postCon  p
{}{
    margin
: 0 auto 1em auto;
}

.postBody h2
{}{
    font-size
: 150%;
    margin
: 15px auto 2px auto;
    font-weight
:bold;
}

.postBody h3 
{}{
    font-size
: 120%;
    margin
: 15px auto 2px auto;
    font-weight
:bold;
}

.postBody h4
{}{
    font-size
:110%;
    margin
:15px auto 2px auto;
    font-weight
:bold;
    color
:#333;
}


.postBody h5
{}{
    font-size
:100%;
    margin
:15px auto 2px auto;
    font-weight
:bold;
    color
:#333;
}


.postBody a:link,.postBody a:visited,.postBody a:active
{}{
    text-decoration
:underline;
}

.postCon a:link,.postCon a:visited,.postCon a:active
{}{
    text-decoration
:underline;
}

.postBody ul,.postCon ul
{}{
    margin-left
:2em;    
}


.postBody li,.postCon li
{}{
    list-style-type
:disc;
    margin-bottom
:1em;
}


.postBody blockquote
{}{
    background
:url('/Skins/LoveIsIntheAir/images/comment.gif'') no-repeat 25px 0px;
    padding
:10px 60px 5px 60px;
    min-height
:35px;
    _height
:35px;
    line-height
:1.6em;
    color
:#333;
}

/**//*****第四部分结束*******************************/

如何使用?看下面的步骤和示意图

【步骤】
管理 - 选项 - Configure

将上面CSS代码复制到下面的 通过CSS定制页面的输入框里。


转载于:https://www.cnblogs.com/juxiaoqi/archive/2008/04/18/1160491.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值