博客園CnBlogs自定義博客樣式分享
弄了半個(gè)晚上的時(shí)間,總算馬馬虎虎搞好了博客的樣式。
整個(gè)博客是藍(lán)色的基調(diào),比較激情,我喜歡。
比較郁悶的是,rightmenu 和 main都是position:absolute 布局的。要添加一個(gè)footer,還真是被惡心到不行,現(xiàn)在雖然做成了position:fixed的,但標(biāo)簽和隨筆增多的時(shí)候,肯定會(huì)覆蓋一部分內(nèi)容。沒有js權(quán)限, 暫時(shí)先放著吧。
1. footer的代碼:MyFooter部分直接插入了內(nèi)聯(lián)的Css樣式,懶得修改了,過段時(shí)間肯定要把footer去掉。
<div id="myFooter" style="position: fixed; bottom: 0px; width: 100%; height: 85px; background: none repeat scroll 0px 0px rgb(0, 120, 216);">
<p id="myFootText">知識(shí)改變命運(yùn),碼農(nóng)拯救人生</p>
<p id="myFootCopy">ohmygirl@2014</p>
</div>
2. 同時(shí)去掉了文章底部煩人的推廣鏈接和廣告banner??粗鍍袅瞬簧伲珻SS代碼為:
/* advertise */
#site_nav_under,#ad_under_post_holder,#under_post_news,#google_ad_c2,#under_post_kb{
width:0;
height:0;
display:none;
overflow:hidden;
}
3.文章底部的評(píng)論按鈕的位置和大小都比較尷尬,位置太靠左,且可點(diǎn)擊范圍太小。這里一并貼出來:
#RecentCommentsBlock li {
margin: 0;
width: 275px;
}
#RecentCommentsBlock li.recent_comment_body {
border-radius: 0;
margin: 0;
}
#RecentCommentsBlock li.recent_comment_title {
border-radius: 5px 5px 0 0;
margin: 3px 0 0;
}
#RecentCommentsBlock li.recent_comment_author {
border-radius: 0 0 5px 5px;
margin: 0;
}
.desc_img{
width:75px;
max-width:75px;
}
#blog-calendar{
background:white;
}
/* comment */
div.commentform{
margin-bottom:100px;
}
#commentform_title {
background: url("<a ) no-repeat scroll 0 2px;
color: #0078d8;
font-size:14px;
}
div.commentform p{
margin-bottom:10px;
}
.comment_btn {
height: 35px;
width: 90px;
background: none repeat scroll 0 0 #0078d8;
border: 0 none;
border-radius: 5px;
color: white;
cursor:pointer;
}
.comment_btn:hover{
background:#317ef3;
}
#commentbox_opt,#commentbox_opt + p {
text-align:center;
}
#tbCommentBody{
width:100%;
resize:none;
}
#tbCommentAuthor,#tbCommentBody{
border:1px solid #0078d8;
}
#tbCommentBody:hover{
border:1px solid #fca021;
}
#comments > h3 {
background: none repeat scroll 0 0 #0078d8;
border-radius: 3px;
color: white;
padding: 8px;
border:0 none;
font-size:14px;
}
#comments{
font-size: 13px;
}
#comments h4{
margin-top:10px;
}
#comments h4 span {
color: #6c6351;
font-size: 12px;
}
.comment_actions {
border-bottom: 1px dashed #0078d8;
display: block;
padding-bottom: 10px;
}
.blog_comment_body {
color: #111;
font-size: 13px;
margin-bottom: 10px;
margin-top: 10px;
}
#comment_nav {
font-size: 14px;
margin-top: 10px;
text-align: right;
}
最后,博客主題部分的css代碼為:
/* header */
#header{
border:1px solid #044e97;
background:#0078d8 repeat;
box-shadow:0 0 5px;
}
h1{
background: none;
border-bottom:0 none;
}
#main{
margin-top:5px;
border-right:0 none;
min-height:1040px;
}
#Header1_HeaderTitle{
color:white;
font-weight:bold;
font-size:24px;
text-shadow:1px 5px 1px #000;
}
#Header1_HeaderTitle:hover{
color:#fca021;
}
#tagline{
color:white;
}
p.date{
background: none repeat scroll 0 0 #0078d8;
border-bottom: 1px solid #aaa;
border-radius: 5px;
color: white;
font-size: 14px;
font-weight: bold;
margin: 10px 10px 0 50px;
padding: 10px;
}
.postFoot, p.postFoot{
padding-bottom:2px;
border-bottom:1px solid #0078d8;
}
.postTitle{
padding:5px 0;
}
.postTitle a{
font-size:15px;
padding:2px 0;
}
.post h2{
border-bottom: 1px dashed #0078d8;
font-size: 1em;
margin-top: 10px;
padding: 0 0 10px;
}
.c_b_p_desc_readmore:hover{
color:#faa123;
}
#cb_post_title_url{
font-size:18px;
}
#MySignature{
border: 1px dashed #0078d8;
display: block;
padding: 5px;
}
#green_channel{
border: 1px dashed #0078d8;
}
/* right menu */
#rightmenu{
border:1px solid #0078d8;
background:#0078d8;
border-radius:10px;
}
#rightmenu ul{
background:white;
}
#rightmenu li{
background: none repeat scroll 0 0 #3385ff;
border: 1px solid #3385ff;
border-radius: 5px;
color: white;
margin: 10px;
padding: 5px;
width: 150px;
}
#rightmenu li a{
color:white;
padding-left:10px;
}
#rightmenu li:hover{
background:#317ef3;
}
#rightmenu h3{
color:white;
padding:2px 0 5px 10px;
font-size:18px;
border:0 none;
}
#blog-calendar{
background:white;
}
div.commentform{
margin-bottom:100px;
}
/* advertise */
#site_nav_under,#ad_under_post_holder,#under_post_news,#google_ad_c2,#under_post_kb{
width:0;
height:0;
display:none;
overflow:hidden;
}
/* calendar */
.Cal{
border:0 none;
width:100%;
height:200px;
font-size:14px;
}
.CalTitle{
font-size:15px;
}
.CalTodayDay{
background:#0078d8;
}
.CalTodayDay a u{
color:#fc6700;
text-decoration:none;
}
相關(guān)文章

15 個(gè)為編程初學(xué)者準(zhǔn)備的網(wǎng)站(都是國外的一些網(wǎng)站)
今天的文章,我們將分享15個(gè)可以學(xué)習(xí)編程的網(wǎng)站,這些網(wǎng)站上提供了很多編程教程,圖書以及編程練習(xí),希望對(duì)你有用2024-11-02- 這篇文章主要介紹了web開發(fā)中的長度單位主要包括px,pt,em等,需要的朋友可以參考下2023-08-06
網(wǎng)頁前端開發(fā)的一些尺寸單位(px,rem單位)
px單位是絕對(duì)單位,一般用于pc端網(wǎng)頁開發(fā),因?yàn)槭墙^對(duì)單位所以在移動(dòng)端上的使用體驗(yàn)并不是很好,rem它是描述相對(duì)于當(dāng)前根元素字體尺寸,是相對(duì)單位,它可以根據(jù)根元素的變換而2023-08-06WEB前端優(yōu)化必備js/css壓縮工具YUI-compressor詳解與集成用法
壓縮工具層次不窮,各有優(yōu)點(diǎn),選擇適合的壓縮工具為將來做項(xiàng)目開發(fā)使用是一件很重要的事情!!在這介紹YUI-compressor,需要的朋友可以參考下2023-06-21- 瀏覽器是多進(jìn)程的,有瀏覽器主進(jìn)程,網(wǎng)絡(luò)進(jìn)程,渲染進(jìn)程,插件進(jìn)程等,在將html,css,javascript解析成一個(gè)頁面的時(shí)候,就需要多個(gè)進(jìn)程的分工合作2023-05-01
- 本文為大家整理了常用的文件對(duì)應(yīng)的MIME類型,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2022-04-25
postman中form-data、x-www-form-urlencoded、raw、binary的區(qū)別介紹
這篇文章介紹了postman中form-data、x-www-form-urlencoded、raw、binary的區(qū)別,對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-12-28網(wǎng)頁中使用Unicode字符的介紹(&#,\u等)
國際組織制定了可以容納世界上所有文字和符號(hào)的字符編碼方案,稱為Unicode,是通用字符集Universal Character Set的縮寫,用以滿足跨語言、跨平臺(tái)進(jìn)行文本轉(zhuǎn)換、處理的要求2021-11-27前端實(shí)現(xiàn)字符串GBK與GB2312的編解碼(小結(jié))
這篇文章主要介紹了前端實(shí)現(xiàn)字符串GBK與GB2312的編解碼(小結(jié)),小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2020-12-02
告別硬編碼讓你的前端表格自動(dòng)計(jì)算的實(shí)例代碼
這篇文章主要介紹了告別硬編碼讓你的前端表格自動(dòng)計(jì)算,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-09-27



