-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyle.css
293 lines (251 loc) · 6.68 KB
/
style.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
292
293
/* 默认的导航栏样式 */
@font-face {
font-family: "GenshinImpactZhLv1";
font-weight: normal;
font-style: normal;
font-display: swap;
src: url(/img/gichn.woff2) format("woff");
}
@keyframes blurFadeIn {
0% {
backdrop-filter: blur(0); /* 从不模糊开始 */
-webkit-backdrop-filter: blur(0);
opacity: 0; /* 从透明开始 */
}
100% {
backdrop-filter: blur(5px); /* 结束时模糊5px */
-webkit-backdrop-filter: blur(5px);
opacity: 1; /* 最终完全可见 */
}
}
/*兼容Safari的代码*/
@-webkit-keyframes blurFadeIn {
0% {
backdrop-filter: blur(0); /* 从不模糊开始 */
-webkit-backdrop-filter: blur(0);
opacity: 0; /* 从透明开始 */
}
100% {
backdrop-filter: blur(5px); /* 结束时模糊5px */
-webkit-backdrop-filter: blur(5px);
opacity: 1; /* 最终完全可见 */
}
}
:root {
--default-green: rgba(138, 163, 45, 0.7);
--focus-green: rgb(121, 150, 37);
--hover-green: rgba(81, 175, 71, 0.7);
--press-green: rgba(90, 206, 24, 0.7);
--default-white: rgba(255, 255, 255, 0.7);
--hover-white: rgba(236, 236, 236, 0.7);
--default-grey: rgba(166, 166, 166, 0.7);
--hover-grey: rgba(114, 115, 114, 0.7);
--box-shadow: rgba(0, 0, 0, 0.4);
--yellow-text: rgb(255, 200, 0);
--default-blue: rgb(0, 0, 238);
--hover-blue: rgb(123, 0, 255);
}
.body {
font-family: "GenshinImpactZhLv1", sans-serif;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.navi {
background-color: var(--default-green);
padding: 20px 40px;
box-shadow: 5px 5px 10px var(--box-shadow);
border-radius: 15px;
}
.navi ul {
list-style-type: none;
padding: 0;
margin: 0;
display: flex;
flex-wrap: wrap; /* 在小屏幕时允许项目换行 */
justify-content: flex-start; /* 居左对齐 */
}
.navi:hover {
background-color: var(--hover-green);
transition: 0.5s;
border-radius: 0;
}
.navi:not(:hover) {
background-color: var(--default-green);
transition: 0.5s;
border-radius: 15px;
}
.nav-item {
margin-right: 25px;
}
.language {
position: absolute;
right: 30px;
}
.nav-item a {
text-decoration: none;
color: white;
padding: 8px 16px;
transition: background-color 0.3s, color 0.3s;
}
.nav-item a:hover {
background-color: var(--hover-white);
transition: 0.5s;
color: var(--yellow-text);
}
/* 子菜单 */
.submenu-container {
position: absolute;
background: var(--hover-green);
border-radius: 15px;
box-shadow: 5px 5px 10px var(--box-shadow);
}
.submenu-item {
color: white;
padding: 15px;
}
/* 基础按钮样式 */
.custom-button {
background-color: var(--default-green); /* 扁平的绿色背景 */
border: none; /* 无边框 */
color: white; /* 字体颜色白色 */
padding: 10px 10px; /* 内边距 */
font-family: "GenshinImpactZhLv1", sans-serif; /* 自定义字体 */
font-size: 16px; /* 字体大小 */
border-radius: 10px; /* 小的圆角 */
cursor: pointer; /* 鼠标指针样式 */
transition: background-color 0.3s ease; /* 背景颜色的过渡效果 */
width: 100px;
height: 50px;
box-shadow: 5px 5px 10px var(--box-shadow);
}
/* 键盘选中时的效果 */
.custom-button:focus {
outline: 2px var(--focus-green);
outline-offset: 2px;
}
/* 鼠标悬停时的效果 */
.custom-button:hover {
background-color: var(--hover-green);
transition: 0.5s;
box-shadow: none;
}
/* 鼠标按下时的效果 */
.custom-button:active {
background-color: var(--press-green); /* 按下时更浅的绿色 */
box-shadow: inset 5px 5px 10px var(--box-shadow);
}
h1 {
color: white;
}
.textbox-container {
display: flex; /* 使用flex布局 */
gap: 10px; /* 元素之间的间距 */
justify-content: flex-start; /* 左对齐 */
flex-wrap: wrap; /* 当屏幕较窄时,自动换行 */
}
.textbox {
display: inline-block; /* 让宽度根据内容自动调整 */
width: fit-content;
border: 2px dashed var(--default-grey);
border-radius: 15px;
box-shadow: 5px 5px 10px var(--box-shadow);
padding: 1rem 1rem;
background-color: rgba(255, 255, 255, 0.7);
overflow: auto; /* 当内容过多时显示滚动条 */
}
.textbox:hover {
background-color: var(--hover-white);
transition: 0.5s;
border-radius: 0;
}
.textbox a {
text-decoration: none;
color: var(--default-blue);
}
.textbox a:hover {
background-color: black;
color: white;
transition: 0.5s;
}
.textbox:not(:hover) {
border: 2px dashed var(--default-grey);
transition: 0.5s;
border-radius: 15px;
}
.site-footer {
background-color: var(--default-grey);
color: black;
padding: 20px 10px;
text-align: center;
margin-top: auto; /* 确保footer位于页面底部 */
box-shadow: 5px 5px 10px var(--box-shadow);
border-radius: 15px;
}
.site-footer:hover {
background-color: var(--hover-grey);
transition: 0.5s;
border-radius: 0;
}
.site-footer:not(:hover) {
background-color: var(--default-grey);
transition: 0.5s;
border-radius: 15px;
}
.footer-content {
margin: 0 auto;
}
.social-links {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 800px;
margin: 0 auto 0;
}
.social-links a {
padding: 0 10px;
}
.web-links a {
color: white;
text-decoration: none;
}
.web-links a:hover {
color: black;
background-color: rgba(255, 255, 255, 0.7);
transition: 0.5s;
}
.linkImage {
border-radius: 5px;
margin-right: 10px;
vertical-align: middle;
}
/* 响应式布局:针对屏幕宽度小于1090px的设备(如手机) */
@media (max-width: 1090px) {
.language {
position: static;
}
.navi {
padding: 5px 10px; /* 减少导航栏内边距 */
}
.navi ul {
flex-direction: column; /* 导航项垂直排列 */
align-items: center; /* 居中对齐 */
}
.nav-item {
margin-right: 0;
margin-bottom: 25px; /* 增加导航项之间的垂直间距 */
}
.nav-item a {
font-size: 16px; /* 调整字体大小 */
padding: 10px 20px; /* 增加点击区域 */
}
.web-links{
display: flex;
flex-direction: column; /* 垂直方向排列 */
}
.textbox {
width: 100%;
}
}