-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
378 lines (322 loc) · 6.34 KB
/
styles.css
File metadata and controls
378 lines (322 loc) · 6.34 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
/* 基础样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.container {
max-width: 100%;
margin: 0 auto;
padding: 1rem;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* 头部样式 */
header {
text-align: center;
color: white;
margin-bottom: 2rem;
padding: 1rem;
}
header h1 {
font-size: 2rem;
margin-bottom: 0.5rem;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
header p {
font-size: 1rem;
opacity: 0.9;
}
/* 主内容区域 */
main {
flex: 1;
background: white;
border-radius: 16px;
padding: 1.5rem;
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
margin-bottom: 1rem;
}
/* 地图视图 */
.map-view {
display: none;
}
.map-view.active {
display: block;
animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.map-view h2 {
text-align: center;
margin-bottom: 1rem;
color: #4a5568;
font-size: 1.5rem;
}
/* 省份头部 */
.province-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
flex-wrap: wrap;
gap: 1rem;
}
.progress {
background: #f7fafc;
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.9rem;
color: #4a5568;
border: 2px solid #e2e8f0;
}
/* 地图容器 */
.map-container {
width: 100%;
max-width: 800px;
margin: 0 auto 2rem;
background: #f8f9fa;
border-radius: 12px;
padding: 1rem;
box-shadow: inset 0 2px 8px rgba(0,0,0,0.1);
}
.map-container svg {
width: 100%;
height: auto;
border-radius: 8px;
}
/* 地图省份样式 */
.province {
fill: #e2e8f0;
stroke: #cbd5e0;
stroke-width: 1;
cursor: pointer;
transition: all 0.3s ease;
}
.province:hover {
fill: #4299e1;
stroke: #2b6cb0;
stroke-width: 2;
}
.province.highlighted {
fill: #48bb78;
stroke: #2f855a;
stroke-width: 2;
animation: pulse 2s infinite;
}
.province.current {
fill: #ed8936;
stroke: #c05621;
stroke-width: 3;
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.02); }
}
/* 省会标记 */
.capital-marker {
fill: #e53e3e;
stroke: white;
stroke-width: 2;
r: 6;
cursor: pointer;
animation: capitalPulse 1.5s infinite;
}
@keyframes capitalPulse {
0%, 100% { r: 6; opacity: 1; }
50% { r: 8; opacity: 0.8; }
}
.capital-label {
font-size: 14px;
font-weight: bold;
fill: #2d3748;
text-anchor: middle;
pointer-events: none;
}
/* 控制按钮 */
.controls {
display: flex;
gap: 0.75rem;
justify-content: center;
flex-wrap: wrap;
margin: 1.5rem 0;
}
.btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 25px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
min-width: 120px;
text-align: center;
}
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none !important;
}
.btn:not(:disabled):hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn:not(:disabled):active {
transform: translateY(0);
}
.btn-primary {
background: linear-gradient(135deg, #4299e1, #3182ce);
color: white;
}
.btn-secondary {
background: linear-gradient(135deg, #48bb78, #38a169);
color: white;
}
.btn-success {
background: linear-gradient(135deg, #ed8936, #dd6b20);
color: white;
}
.btn-outline {
background: transparent;
color: #4a5568;
border: 2px solid #e2e8f0;
}
.btn-outline:hover {
background: #f7fafc;
border-color: #cbd5e0;
}
/* 答案区域 */
.answer-area {
margin-top: 2rem;
display: flex;
gap: 1rem;
flex-wrap: wrap;
justify-content: center;
}
.answer-item {
background: linear-gradient(135deg, #f7fafc, #edf2f7);
padding: 1.5rem;
border-radius: 12px;
text-align: center;
min-width: 200px;
border: 2px solid #e2e8f0;
transition: all 0.3s ease;
}
.answer-item.hidden {
display: none;
}
.answer-item h3 {
color: #4a5568;
margin-bottom: 0.5rem;
font-size: 1.1rem;
}
.answer-item p {
color: #2d3748;
font-size: 1.3rem;
font-weight: bold;
}
/* 统计面板 */
.stats-panel {
background: linear-gradient(135deg, #f7fafc, #edf2f7);
padding: 1rem;
border-radius: 12px;
display: flex;
justify-content: center;
gap: 2rem;
margin: 1rem 0;
border: 2px solid #e2e8f0;
}
.stat-item {
text-align: center;
}
.stat-label {
display: block;
color: #718096;
font-size: 0.9rem;
margin-bottom: 0.25rem;
}
.stat-item span:last-child {
font-size: 1.5rem;
font-weight: bold;
color: #4a5568;
}
/* 底部 */
footer {
text-align: center;
color: white;
opacity: 0.8;
font-size: 0.9rem;
padding: 1rem;
}
/* 响应式设计 */
@media (max-width: 768px) {
.container {
padding: 0.5rem;
}
header h1 {
font-size: 1.5rem;
}
main {
padding: 1rem;
}
.province-header {
flex-direction: column;
text-align: center;
}
.controls {
gap: 0.5rem;
}
.btn {
min-width: 100px;
padding: 0.6rem 1rem;
font-size: 0.9rem;
}
.answer-area {
flex-direction: column;
align-items: center;
}
.answer-item {
min-width: auto;
width: 100%;
max-width: 300px;
}
.stats-panel {
gap: 1rem;
}
}
@media (max-width: 480px) {
header h1 {
font-size: 1.3rem;
}
.map-view h2 {
font-size: 1.2rem;
}
.btn {
min-width: 80px;
padding: 0.5rem 0.8rem;
font-size: 0.8rem;
}
}
/* 加载动画 */
.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid #f3f3f3;
border-top: 3px solid #4299e1;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}