【转载】怎么设置博客背景
写在前面
鉴于平常逛其他大神的blog的时候,经常看见他们blog上好看的背景。但自己又不知道怎么弄的,觉得很神奇。直接度娘试了前几篇发现没用。于是对着别人blog的网页源代码捣腾了一个下午,发现了摸索出了一些奥妙重重的东西,于是就挂到自己blog上给大家分享一下,如侵删。
第一步、将所需要的图片上传至博客园的服务器上
具体的方法有很多种,以下列举几种:
- 发表一篇blog(随笔),在blog里面传上你想要的背景图片。然后打开那篇blog,开审查元素或对着图片点
复制图片地址。 - 直接讲图片传至相册上,这种方法我没试过,不过百度上说应该也是可行的。
这样你就将背景上传至了博客园的服务器并且获得了背景图片的地址。
第二步、修改博客源码
这一步比较困难。。。我花了一个下午也基本上是在找这个。。。(因为自己非常弱鸡不会HTML所以只能看现成的别人的源码)
点开博客管理,点设置,然后在页面定制CSS代码这个框里面粘贴上一下代码:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
/*simplememory*/#google_ad_c1, #google_ad_c2 {display:none;}.syntaxhighlighter a, .syntaxhighlighter div, .syntaxhighlighter code, .syntaxhighlighter table, .syntaxhighlighter table td, .syntaxhighlighter table tr, .syntaxhighlighter table tbody, .syntaxhighlighter table thead, .syntaxhighlighter table caption, .syntaxhighlighter textarea {font-size: 14px!important;}#home {opacity: 0.80;margin: 0 auto;width: 85%;min-width: 950px; padding: 0px; color: green;">#fff;padding: 30px;margin-top: 30px;margin-bottom: 50px;box-shadow: 0 2px 6px rgba(100, 100, 100, 0.3);}#blogTitle h1 {font-size: 30px;font-weight: bold;font-family: "Comic Sans MS";line-height: 1.5em;margin-top: 20px;color: #515151;}#navList a:hover {color: #4C9ED9;text-decoration: none;}#navList a {display: block;width: 5em;height: 22px;float: left;text-align: center;padding-top: 18px;}#navigator {font-size: 15px;border-bottom: 1px solid #ededed;border-top: 1px solid #ededed;height: 50px;clear: both;margin-top: 25px;}.catListTitle {margin-top: 21px;margin-bottom: 10.5px;text-align: left;border-left: 10px solid rgba(82, 168, 236, 0.8);padding: 10px 0 14px 10px; padding: 0px; color: green;">#f5f5f5;}#ad_under_post_holder #google_ad_c1,#google_ad_c2{display: none !important;}body {color: #000;background: url(http://images2015.cnblogs.com/blog/969197/201703/969197-20170325160900815-1058599404.jpg) fixed;background-size: 100%;background-repeat: no-repeat;font-family: "Helvetica Neue",Helvetica,Verdana,Arial,sans-serif;font-size: 12px;min-height: 101%;}#topics .postTitle {border: 0px;font-size: 200%;font-weight: bold;float: left;line-height: 1.5;width: 100%;padding-left: 5px;} div.commentform p{margin-bottom:10px;}.comment_btn {padding: 5px 10px;height: 35px;width: 90px;border: 0 none;border-radius: 5px;background: #ddd;color: #999;cursor:pointer;font-family: "Lato", Helvetica Neue, Helvetica, Microsoft Yahei, 宋体, Arial, sans-serif;text-shadow: 0 0 1px #fff;display: inline !important;}.comment_btn:hover{padding: 5px 10px;height: 35px;width: 90px;border: 0 none;border-radius: 5px;background: #258fb8;color: white;cursor:pointer;font-family: "Lato", Helvetica Neue, Helvetica, Microsoft Yahei, 宋体, Arial, sans-serif;text-shadow: 0 0 1px #fff;display: inline !important;}#commentform_title {background-image:none;background-repeat:no-repeat;margin-bottom:10px;padding:0;font-size:24px;}#commentbox_opt,#commentbox_opt + p {text-align:center;}.commentbox_title {width: 100%;}#tbCommentBody {font-family:'Microsoft Yahei', Microsoft Yahei, 宋体, sans-serif;margin-top:10px;max-width:100%;min-width:100%;background:white;color:#333;border:2px solid #fff;box-shadow:inset 0 0 8px #aaa;// padding:10px;height:250px;font-size:14px;min-height:120px;}.feedbackItem {font-size:14px;line-height:24px;margin:10px 0;padding:20px;background:#F2F2F2;box-shadow:0 0 5px #aaa;}.feedbackListSubtitle {font-weight:normal;} #blog-comments-placeholder, #comment_form {padding: 20px;background: #fff;-webkit-box-shadow: 1px 2px 3px #ddd;box-shadow: 1px 2px 3px #ddd;margin-bottom: 50px;}.feedback_area_title {margin-bottom: 15px;font-size: 1.8em;}.feedbackItem {border-bottom: 1px solid #CCC;margin-bottom: 10px;padding: 5px;background: rgb(248, 248, 248);}.color_shine {background: rgb(226, 242, 255);}.feedbackItem:hover {-webkit-animation-name: color_shine;-webkit-animation-duration: 2s;-webkit-animation-iteration-count: infinite;}#comment_form .title {font-weight: normal;margin-bottom: 15px;} |
找到
|
1
2
3
4
5
6
7
8
9
10
|
body {color: #000;background: url(http://images2015.cnblogs.com/blog/969197/201703/969197-20170325160900815-1058599404.jpg) fixed;background-size: 100%;background-repeat: no-repeat;font-family: "Helvetica Neue",Helvetica,Verdana,Arial,sans-serif;font-size: 12px;min-height: 101%;} |

浙公网安备 33010602011771号