-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
291 lines (246 loc) · 5.35 KB
/
styles.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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
/* 全局样式 */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
background-image: url('image5.jpg');
background-size: cover;
background-attachment: fixed;
background-position: center;
}
/* 头部样式 */
header {
background: rgba(52, 152, 219, 0.8); /* 使用半透明的背景 */
color: #fff;
padding: 1rem;
text-align: center;
}
header h1 {
margin-bottom: 1rem;
font-size: 2.5rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
nav ul {
list-style-type: none;
}
nav ul li {
display: inline;
margin-right: 1rem;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-size: 1.1rem;
transition: color 0.3s;
}
nav ul li a:hover {
color: #f1c40f;
}
/* 主要内容样式 */
main {
background-color: rgba(255, 255, 255, 0.8);
padding: 2rem;
border-radius: 10px;
margin: 2rem auto;
max-width: 1200px;
}
/* 轮播图样式 */
.carousel {
position: relative;
max-width: 600px; /* 增加最大宽度以适应更大的��片 */
margin: 0 auto;
overflow: hidden;
}
.carousel-container {
display: flex;
transition: transform 0.5s ease-in-out;
}
.carousel-container img {
width: 100%;
height: 400px; /* 或者您希望的其他高度 */
object-fit: cover; /* 这会确保图片填满容器并保持其比例 */
}
.carousel-button {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(0, 0, 0, 0.5);
color: #fff;
border: none;
padding: 1rem;
cursor: pointer;
font-size: 1.5rem;
}
.carousel-button.prev {
left: 10px;
}
.carousel-button.next {
right: 10px;
}
/* 关于我样式 */
#about {
margin-top: 2rem;
}
.about-container {
display: flex;
align-items: flex-start;
flex-wrap: wrap;
}
.avatar {
width: 200px;
height: 200px;
border-radius: 50%;
object-fit: cover;
margin-right: 2rem;
margin-bottom: 1rem;
}
.about-content {
flex: 1;
min-width: 200px;
}
.interests {
list-style-type: none;
display: flex;
flex-wrap: wrap;
margin-top: 1rem;
}
.interests li {
margin-right: 1rem;
margin-bottom: 0.5rem;
}
/* 聊天界面样式 */
#chat-container {
max-width: 600px;
margin: 2rem auto;
border: 1px solid #ddd;
border-radius: 5px;
overflow: hidden;
}
#chat-history {
height: 300px;
overflow-y: auto;
padding: 1rem;
background-color: #f9f9f9;
}
#chat-input {
display: flex;
padding: 1rem;
background-color: #fff;
}
#user-input {
flex: 1;
padding: 0.5rem;
border: 1px solid #ddd;
border-radius: 3px;
}
#send-button {
background-color: #3498db;
color: #fff;
border: none;
padding: 0.5rem 1rem;
margin-left: 0.5rem;
cursor: pointer;
border-radius: 3px;
}
/* 页脚样式 */
footer {
background-color: rgba(52, 73, 94, 0.8); /* 使用半透明的背景 */
color: #fff;
text-align: center;
padding: 1rem;
margin-top: 2rem;
}
.social-links a {
color: #fff;
font-size: 1.5rem;
margin: 0 0.5rem;
transition: color 0.3s;
}
.social-links a:hover {
color: #f1c40f;
}
.social-links a.weibo {
color: #e6162d; /* 微博的品牌色 */
}
.social-links a.xiaohongshu {
color: #fe2c55; /* 小红书的品牌色 */
}
.social-links a.bilibili {
color: #00a1d6; /* bilibili的品牌色 */
}
.social-links a.weibo:hover,
.social-links a.xiaohongshu:hover,
.social-links a.bilibili:hover {
color: #f1c40f; /* 统一的悬停颜色 */
}
.social-links a.zhihu {
color: #0084ff; /* 知乎的品牌��� */
}
.social-links a.zhihu:hover {
color: #f1c40f; /* 统一的悬停颜色 */
}
/* 响应式设计 */
@media (max-width: 768px) {
.about-container {
flex-direction: column;
align-items: center;
}
.avatar {
margin-right: 0;
margin-bottom: 1rem;
}
.about-content {
text-align: center;
}
.interests {
justify-content: center;
}
}
/* 留言板样式 */
#contact-form {
display: flex;
flex-direction: column;
max-width: 500px;
margin: 0 auto;
width: 100%; /* 确保表单占满容器宽度 */
}
#contact-form input,
#contact-form textarea {
margin-bottom: 1rem;
padding: 0.5rem;
border: 1px solid #ddd;
border-radius: 4px;
width: 100%; /* 确保输入框和文本区域占满表单宽度 */
}
#contact-form textarea {
height: 150px;
resize: vertical; /* 允许用户调整文本区域的高度 */
}
#contact-form button {
background-color: #3498db;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 4px;
cursor: pointer;
align-self: flex-start; /* 将按钮对齐到左侧 */
}
#contact-form button:hover {
background-color: #2980b9;
}
#form-status {
margin-top: 1rem;
text-align: center;
font-weight: bold;
}
/* 响应式设计 */
@media (max-width: 768px) {
#contact-form {
padding: 0 1rem; /* 在小屏幕上添加一些左右内边距 */
}
}