寫在前面甥啄,這個教程不是我原創(chuàng),只是我換背景的時候找了三篇博文才把背景換好氯窍,所以總結(jié)一下缔杉,讓朋友們少走彎路锤躁。
改完背景后我發(fā)現(xiàn)其實只是把css代碼里的背景地址換成我們想要設置的圖片地址就可以,所以直接進入第3步就可以或详,小白的話可以從第1步開始看系羞。
1.先獲取背景地址,直接去網(wǎng)上找喜歡的圖片的地址就可以了霸琴,但是這樣的缺點是萬一那張圖片的地址變了椒振,博客園的背景就跟著變了,所以可以先把背景存博客園相冊沈贝,不過怕麻煩的話可以直接復制圖片地址進入第二步
先把想要設置的背景圖上傳到自己的博客相冊里
????步驟:進入博客園首頁》右上角我的博客》管理》相冊
? ? 先建立一個相冊杠人,再上傳照片
? ? 建好以后這個樣子,然后點擊沒有照片宋下,選擇文件
2.記錄好相冊里背景圖的url
步驟:點擊上傳的圖片》點擊f12查看元素》光標點到圖片那里查看圖片的url
3.修改css代碼里body里的圖片路徑(這一步很關(guān)鍵,我就是卡在這個地方才搞了半天才發(fā)現(xiàn)問題)
步驟:點擊管理》設置》找到“頁面定制css代碼”》復制下面這一段代碼到框里
white-space: pre;
? ? word-wrap: normal;
}
.cnblogs-markdown .hljs {
? ? display: block;
? ? overflow-x: auto;
? ? padding: 0.5em;
? ? background: #23241f !important;
? ? color: #FFF;
? ? white-space: pre;
? ? word-break: normal;
}
.hljs,
.hljs-tag,
.hljs-subst {
? color: #f8f8f2;
}
.hljs-strong,
.hljs-emphasis {
? color: #a8a8a2;
}
.hljs-bullet,
.hljs-quote,
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-link {
? color: #ae81ff;
}
.hljs-code,
.hljs-title,
.hljs-section,
.hljs-selector-class {
? color: #a6e22e;
}
.hljs-strong {
? font-weight: bold;
}
.hljs-emphasis {
? font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-attr {
? color: #f92672;
}
.hljs-symbol,
.hljs-attribute {
? color: #66d9ef;
}
.hljs-params,
.hljs-class .hljs-title {
? color: #f8f8f2;
}
.hljs-string,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-addition,
.hljs-variable,
.hljs-template-variable {
? color: #e6db74;
}
.hljs-comment,
.hljs-deletion,
.hljs-meta {
? color: #75715e;
}
.cnblogs_code {
? ? background-color: rgba(245, 245, 245, 0.05);
}
#AjaxHolder_UpdatePanel1, #AjaxHolder_PostComment_divCommnentArea, #profile, .entrylist, .gallery {
? ? background: none repeat scroll 0 0 rgba(255, 255, 255, 0.24);
? ? border-radius: 7px;
? ? box-shadow: 1px 1px 2px #A7A8AD;
? ? margin: 0 0 15px 0;
? ? min-height: 200px;
? ? overflow: hidden;
? ? padding: 0 15px;
? ? text-overflow: ellipsis;
? ? word-break: break-all;
}
#home {
? ? margin: 0 auto;
? ? width: 80%;/*原始65*/
? ? min-width: 980px;/*頁面頂部的寬度*/
? ? background-color:rgba(185, 171, 171, 0.29);
? ? padding: 30px;
? ? margin-top: 50px;
? ? margin-bottom: 50px;
? ? box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);
}
body {
? ? background-repeat: no-repeat;?
? ? background: rgba(12, 100, 129, 0)? fixed;
? ? background-image:url('https://pic4.zhimg.com/v2-8edde88d4f64057c7e99847164445555_r.jpg');
? ? background-size: 100%;
? ? background-repeat: no-repeat;
? ? font-family: "Helvetica Neue",Helvetica,Verdana,Arial,sans-serif;
? ? font-size: 12px;
? ? min-height: 101%;
}
#blogTitle {
? ? height: 100px;? /*高度*/
? ? clear: both;
? ? background-color: rgba(245, 245, 245, 0);
}
#blogTitle h1 {
? ? font-size: 36px;
? ? font-weight: bold;
? ? line-height: 1.8em;/*原始 1.6em*/
? ? margin-top: 10px;/*原始 15px */
? ? color: #548B54;
}
#blogTitle h2 {
? ? font-weight: normal;
? ? font-size: 17px;/*原始 16px 学歧;font-size: 1.0rem;*/? ? ?
? ? line-height: 1.8;
? ? color: #FFFFFF;
? ? font-weight: bold;
? ? text-align: right;
? ? float: right;
}
#navigator{
? ? background-color:rgba(59, 181, 153, 0);
}
#navList a:link, #navList a:visited, #navList a:active{
? ? color: rgba(29, 15, 15, 0.53);
? ? font-size: 18px;
? ? font-weight: bold;
}
#navList a:hover {
? ? color: white;
? ? background-color: rgba(52, 52, 52, 0.09);
? ? text-decoration: none;
? ? text-shadow: 0px 0px 0px #19d427;
}
.blogStats{
? ? color: #eee;
}
.postTitle {
? ? border-left: 8px solid rgba(41, 162, 56, 0.56);
? ? margin-left: 10px;
? ? margin-bottom: 10px;
? ? font-size: 20px;
? ? float: right;
? ? width: 100%;
? ? clear: both;
}
.postTitle a:link, .postTitle a:visited, .postTitle a:active {
? ? color:rgba(16, 25, 16, 0.43);
? ? transition: all 0.4s linear 0s;
}
.postTitle a:hover {
? ? margin-left: 30px;
? ? color: #0f3647;
? ? text-decoration: none;
}
.postCon {
? ? float: right;
? ? line-height: 1.5em;
? ? width: 100%;
? ? clear: both;
? ? padding: 10px 0;
}
.day .postTitle a {
? ? padding-left: 10px;
}
.day {
? ? background: rgba(255, 255, 255, 0);
}
/*文章附加信息*/
.postDesc {?
? ? background: url(images/posted_time.png) no-repeat 0 1px;
? ? color: #757575;
? ? float: left;
? ? width: 100%;
? ? clear: both;
? ? text-align: left;? ?
? ? font-family: "微軟雅黑" , "宋體" , "黑體" ,Arial;
? ? font-size: 13px;
? ? padding-right: 20px;/*5px? padding-left: 90px;posted 發(fā)表時間左邊距離*/
? ? margin-top: 20px;
? ? line-height: 1.8;
? ? padding-bottom: 35px;
}
.newsItem, .catListEssay, .catListLink, .catListNoteBook, .catListTag, .catListPostCategory,
.catListPostArchive, .catListImageCategory, .catListArticleArchive, .catListView,
.catListFeedback, .mySearch, .catListComment, .catListBlogRank, .catList, .catListArticleCategory ,#blog-calendar
{
? ? background: rgba(255, 255, 255, 0.5);
? ? margin-bottom: 35px;
? ? word-wrap: break-word;
}
.CalTitle{
? ? background: rgba(255, 255, 255, 0);
}
.catListTitle{
? ? background-color: rgba(33, 160, 139, 0);
}
.catListTitle {
? ? background: rgba(51, 153, 0, 0);
? ? border-bottom: 1px solid #006600;
? ? border-top-left-radius: 7px;
? ? border-top-right-radius: 7px;
? ? color: rgba(37, 177, 80, 0.61);
? ? font-size: 1.3em;
? ? height: 1.8em;
? ? line-height: 1.8em;
? ? padding: 6px;
? ? text-indent: 0.6em;
? ? text-shadow: 0px 0px rgba(0, 0, 0, 0.3);
}
#topics{
? ? background: rgba(255, 255, 255, 0.5);
}
.c_ad_block{
? ? display: none;
}
#tbCommentBody{
? ? width: 100%;
? ? height: 200px;
? ? background: rgba(255, 255, 255, 0.5);
}
#q{background: rgba(255, 255, 255, 0);}
.CalNextPrev{background: rgba(255, 255, 255, 0);}
在上面這一串代碼中找到body罩引,把body里的url換成背景圖的url,注意:url括號里有個引號枝笨,不要漏了袁铐,我第一次改的時候漏了就出錯了揭蜒,箭頭指的大概是背景圖的大小,我第一次復制的另外個博主的代碼改出來就是n張背景圖拼接的剔桨,換成這個大小以后就是一張很大的背景圖了
都改好以后點擊保存就可以了屉更,不必禁用模板默認css
如果改完以后博客依然不是自己改的背景圖的話,可能是自己之前選的皮膚和自己的背景圖樣式?jīng)_突洒缀,再把皮膚改成darkgreentrip就可以了瑰谜,如果還不可以的話.......就自己檢查一下,反正這樣改百分之百能成功树绩,我寫這篇文章就又改了一次萨脑,嘿嘿