-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
412 lines (357 loc) · 8.98 KB
/
Copy pathstyles.css
File metadata and controls
412 lines (357 loc) · 8.98 KB
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
/* 居中显示卡片 */
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
font-family: "楷体";
font-size: 19px;
}
/* 节假日通知样式 */
.holiday-notification {
background-color: #ffee8a;
border-radius: 10px;
padding: 20px;
margin: 15px 0;
font-size: 20px;
color: #333;
text-align: center;
min-width: 10%;
max-width: 100%;
box-sizing: border-box;
animation: fadeIn 2s ease-in-out;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}
/* 每日信息样式 */
.daily-message {
background-color: #E3F2FD;
border-radius: 10px;
padding: 10px 20px;
margin-bottom: 20px;
font-size: 19px;
color: #333;
text-align: center;
min-width: 10%;
max-width: 100%;
box-sizing: border-box;
animation: fadeIn 2s ease-in-out;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}
/* 倒计时卡片样式 */
.countdown-card {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
width: 90%;
max-width: 600px;
height: auto;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
padding: 20px;
box-sizing: border-box;
animation: fadeIn 2s ease-in-out;
}
/* 卡片头部样式 */
.card-header {
background-color: #edf3ff;
padding: 5px 10px;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
font-size: 24px;
font-weight: bold;
color: #000000;
width: 100%;
box-sizing: border-box;
border-radius: 10px;
/* 添加圆角效果 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
/* 添加立体效果 */
}
/* 卡片头部沙漏图标样式 */
.card-header .hourglass-icon:before {
content: '\23F3';
font-size: 36px;
margin-right: 19px;
font-family: '微软雅黑';
}
/* 卡片主体样式 */
.card-body {
padding: 20px;
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
height: 100%;
box-sizing: border-box;
}
/* 倒计时项目样式 */
.countdown-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
box-sizing: border-box;
margin-bottom: 15px;
/* 增加底部外边距 */
}
/* 倒计时标签样式 */
.countdown-label {
font-size: 20px;
color: #000000;
width: 100%;
text-align: center;
margin-bottom: 15px;
}
/* 倒计时进度条样式 */
.countdown-progress {
background-color: #f0f0f0;
border-radius: 5px;
height: 15px;
overflow: hidden;
position: relative;
width: 100%;
margin: 10px;
box-sizing: border-box;
}
/* 倒计时进度条内部进度条样式 */
.countdown-progress-bar {
height: 100%;
border-radius: 10px;
width: 0;
/* 初始宽度为0 */
background-color: #00b096;
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-size: 20px 20px;
animation: progress-scroll 1s linear infinite, loadProgress 0.5s ease-in-out forwards;
transition: width 0.5s ease;
}
/* 年进度条样式 */
#year-progress {
background-color: #ff7e5f;
animation: progress-scroll 1s linear infinite, loadProgress 0.5s ease-in-out forwards;
}
/* 月进度条样式 */
#month-progress {
background-color: #6a11cb;
animation: progress-scroll 1s linear infinite, loadProgress 0.5s ease-in-out forwards;
}
/* 日进度条样式 */
#day-progress {
background-color: #00b096;
animation: progress-scroll 1s linear infinite, loadProgress 0.5s ease-in-out forwards;
}
/* 周进度条样式 */
#week-progress {
background-color: #2994ff;
animation: progress-scroll 1s linear infinite, loadProgress 0.5s ease-in-out forwards;
}
/* 日期时间样式 */
#date-time {
font-size: 20px;
color: #333;
margin-top: 10px;
text-align: center;
}
/* 星期与周数样式 */
#day-of-week,
#week-number {
font-size: 20px;
color: #3052ce;
margin: 0 10px;
}
/* 日期信息容器样式 */
.date-info {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
flex-direction: row;
}
/* 日期进度条样式 */
.date-progress {
background-color: #f5f5f5;
border-radius: 5px;
height: 15px;
overflow: hidden;
position: relative;
width: 100%;
margin-top: 10px;
box-sizing: border-box;
}
/* 日期进度条内部进度条样式 */
.date-progress-bar {
height: 100%;
border-radius: 10px;
width: 0;
/* 初始宽度为0 */
background-color: #00b096;
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-size: 20px 20px;
animation: progress-scroll 1s linear infinite;
transition: width 0.5s ease;
}
/* 加粗显示的天样式 */
.bold-day {
font-weight: bold;
color: #fa8155;
}
/* 加粗显示的周样式 */
.bold-week {
font-weight: bold;
color: #b369fe;
}
/* 加粗显示的月样式 */
.bold-month {
font-weight: bold;
color: #00bc7b;
}
/* 加粗显示的年样式 */
.bold-year {
font-weight: bold;
color: #ffad36;
}
/* 动画效果 */
@keyframes progress-scroll {
from {
background-position: 0 0;
}
to {
background-position: -20px 0;
}
}
/* 淡入动画效果 */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* 大屏幕适配 (800px以上) */
@media only screen and (min-width: 800px) {
.countdown-card {
max-width: 600px;
}
.holiday-notification,
.daily-message {
width: auto;
min-width: 100%;
max-width: 100%;
display: inline-block;
padding: 10px 20px;
}
.countdown-progress {
position: relative;
padding-right: 50px;
}
.countdown-percentage {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
font-size: 15px;
color: #000000;
/* text-shadow: 1px 1px 2px rgba(110, 110, 110, 0.3); */
/* 添加阴影效果 */
}
.date-info {
width: 100%;
}
.countdown-progress-bar,
.date-progress-bar {
width: calc(100% - 30px);
}
}
/* 小屏幕适配 (800px以下) */
@media only screen and (max-width: 800px) {
body {
font-size: 20px;
padding: 10px;
}
.holiday-notification,
.daily-message {
display: block;
width: 100%;
padding: 10px;
margin-bottom: 15px;
}
.countdown-card {
width: 100%;
height: auto;
padding: 10px;
}
.countdown-item {
margin-bottom: 20px;
}
.countdown-label {
margin-bottom: 5px;
}
.countdown-progress {
margin: 5px;
padding-right: 30px;
/* 为百分比显示留出空间 */
}
.countdown-progress-bar,
.date-progress-bar {
width: calc(100% - 30px);
}
.card-header {
font-size: 25px;
padding: 10px;
}
.card-header .hourglass-icon:before {
font-size: 30px;
margin-right: 15px;
}
.holiday-notification+.daily-message {
margin-top: 0;
}
.date-info {
margin-top: 8px;
width: 100%;
}
.date-progress {
margin-top: 10px;
width: 100%;
height: 15px;
}
.countdown-percentage,
.date-percentage {
position: absolute;
right: 5px;
top: 0;
font-size: 15px;
color: #000000;
text-align: right;
z-index: 1;
}
/* 针对大屏幕的调整,确保进度条有足够的内边距以显示百分比 */
@media only screen and (min-width: 800px) {
.countdown-percentage {
position: absolute;
right: 5px;
/* 如果希望百分比仍然在右侧 */
top: 2px;
font-size: 16px;
/* 适当调整字体大小以适应大屏幕 */
}
/* 针对小屏幕的调整 */
@media only screen and (max-width: 800px) {
.countdown-percentage {
top: 2px;
right: 5px;
font-size: 15px;
/* 适当调整字体大小以适应小屏幕 */
}
}
}
}