cwadayi commited on
Commit
930579d
·
verified ·
1 Parent(s): 9955982

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +361 -23
style.css CHANGED
@@ -1,46 +1,185 @@
1
  /* --- Google Font 與全域設定 --- */
2
- @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display.swap');
3
 
4
  :root {
5
  --primary-color: #005f73;
6
  --secondary-color: #0a9396;
7
- /* ... (其他 CSS 變數不變) ... */
 
 
 
 
 
 
 
 
8
  }
9
 
10
  html {
11
  scroll-behavior: smooth;
12
- scroll-padding-top: 80px;
13
  }
14
 
15
  body {
16
  font-family: 'Noto Sans TC', sans-serif;
17
- /* ... (其他 body 樣式不變) ... */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  }
19
 
20
- /* ... (導覽列、Header、Main、Section 等主要結構樣式不變) ... */
21
 
22
- /* --- ★★★★★ 修正後的圖片顯示方式 ★★★★★ --- */
23
  .figure-container {
24
  margin: 20px 0;
25
  padding: 0;
26
  }
27
-
 
 
 
28
  .figure-container img {
29
- display: block; /* 關鍵:確保圖片是區塊元素 */
30
- box-sizing: border-box; /* 關鍵:確保 padding 和 border 不會增加寬度 */
31
- max-width: 100%; /* 關鍵:最大寬度不超過容器 */
32
- width: 100%; /* 關鍵:嘗試填滿容器寬度 */
33
- height: auto; /* 關鍵:保持圖片原始長寬比 */
34
  margin: 15px auto;
35
  border: 1px solid var(--border-color);
36
  border-radius: 8px;
37
- cursor: zoom-in; /* 提示使用者可以點擊 */
38
  transition: box-shadow 0.3s;
39
  }
40
  .figure-container img:hover {
41
  box-shadow: var(--shadow-lg);
42
  }
43
-
44
  .figure-container figcaption {
45
  margin-top: 10px;
46
  font-size: .9rem;
@@ -52,7 +191,8 @@ body {
52
  border-radius: 4px;
53
  }
54
 
55
- /* --- ★★★★★ 新增:燈箱 (Lightbox) 樣式 ★★★★★ --- */
 
56
  .lightbox {
57
  position: fixed;
58
  top: 0;
@@ -70,31 +210,229 @@ body {
70
  cursor: zoom-out;
71
  animation: fadeIn 0.3s ease;
72
  }
73
-
74
  .lightbox.closing {
75
  animation: fadeOut 0.3s ease forwards;
76
  }
77
-
78
  .lightbox img {
79
  max-width: 100%;
80
  max-height: 100%;
81
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
82
  border-radius: 8px;
83
  }
84
-
85
  @keyframes fadeIn {
86
  from { opacity: 0; }
87
  to { opacity: 1; }
88
  }
89
-
90
  @keyframes fadeOut {
91
  from { opacity: 1; }
92
  to { opacity: 0; }
93
  }
94
 
95
 
96
- /* --- 其他原有樣式 (保持不變) --- */
97
- /* (為了節省篇幅,此處省略大部分 CSS,請用上一輪提供的完整 CSS,然後僅修改上述 `figure-container img` 並新增 `lightbox` 樣式) */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
- /* 沿用舊版確保相容性 */
100
- .nav-container{max-width:1100px;margin:0 auto;display:flex;justify-content:space-between;align-items:center}.nav-logo{font-size:1.5rem;font-weight:700;color:var(--primary-color);text-decoration:none}.nav-menu{list-style:none;display:flex;gap:1rem;margin:0;padding:0}.nav-link{color:var(--text-secondary);text-decoration:none;font-weight:500;padding:.5rem 1rem;border-radius:6px;position:relative;transition:color .3s}.nav-link:hover,.nav-link.active{color:var(--primary-color)}.nav-link::after{content:'';position:absolute;width:0;height:3px;bottom:-5px;left:50%;transform:translateX(-50%);background-color:var(--secondary-color);border-radius:2px;transition:width .3s ease-in-out}.nav-link:hover::after,.nav-link.active::after{width:60%}.header-content h1{font-size:3.2rem;font-weight:700;margin-bottom:.5rem}.table-container{border:1px solid var(--border-color);border-radius:8px;overflow:hidden}.interp-item{border-radius:12px}.constraints-levels{gap:1rem}.level-item{padding:1.5rem;border-radius:8px}.case-study{background-color:var(--bg-dark);color:var(--bg-light);border-radius:16px;border:none}.case-study h2{color:#fff}.step{background-color:#495057}.app-card-header{border-top-left-radius:12px;border-top-right-radius:12px}.special-topic-section{background-color:#f7feff;border-left:5px solid var(--secondary-color)}.topic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(350px,1fr));gap:2rem}.topic-item{background-color:#fff;padding:1.5rem;border-radius:12px;box-shadow:var(--shadow);border-top:4px solid var(--highlight-color)}.topic-item h3{font-size:1.5rem;color:var(--primary-color);border-bottom:2px solid var(--border-color);padding-bottom:.5rem;margin-bottom:1rem}.topic-item h4{font-size:1.2rem;color:var(--secondary-color);font-style:italic}.summary-text{text-align:center;font-size:1.2rem;font-weight:500}.back-to-top{position:fixed;bottom:20px;right:20px;background-color:var(--primary-color);color:white;width:50px;height:50px;border-radius:50%;display:flex;justify-content:center;align-items:center;text-decoration:none;box-shadow:var(--shadow-lg);opacity:0;visibility:hidden;transform:translateY(20px);transition:opacity .3s,visibility .3s,transform .3s,background-color .3s}.back-to-top.visible{opacity:1;visibility:visible;transform:translateY(0)}.back-to-top:hover{background-color:var(--accent-color)}.back-to-top svg{width:24px;height:24px}.quote-box{background-color:#e0f7fa;border-left:5px solid #00796b;margin:20px 0;padding:15px 20px;border-radius:5px;font-style:italic}table{width:100%;border-collapse:collapse;margin-top:20px}th,td{padding:15px;text-align:left;border:1px solid #dee2e6}thead{background-color:#00796b;color:#fff}tbody tr:nth-of-type(even){background-color:#f8f9fa}td.category{background-color:#e0f7fa;font-weight:700;color:#004d40;vertical-align:middle}.interpretation-methods,.case-study-steps{display:grid;grid-template-columns:1fr;gap:30px;margin-top:20px}@media (min-width:768px){.interpretation-methods,.case-study-steps{grid-template-columns:1fr 1fr}}.interp-item{padding:25px;border-radius:8px;background-color:#f8f9fa;border:1px solid #e9ecef}.level-item{padding:20px;border-left:5px solid;border-radius:8px}.level-item:nth-of-type(1){border-color:#ae2012;background-color:#fff1f0}.level-item:nth-of-type(2){border-color:#ee9b00;background-color:#fff9eb}.level-item:nth-of-type(3){border-color:#005f73;background-color:#e0f7fa}.step{background-color:#495057;padding:25px;border-radius:8px}.step h3{color:#94d2bd}.app-grid-expanded{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:25px;margin-top:20px}.app-card{background:#fff;border:1px solid #e9ecef;border-radius:12px;box-shadow:var(--shadow);display:flex;flex-direction:column;transition:transform .3s ease-in-out,box-shadow .3s ease-in-out}.app-card:hover{transform:translateY(-8px);box-shadow:var(--shadow-lg)}.app-card-body ul{flex-grow:1}.example-link{display:inline-block;margin-top:15px;padding:10px 18px;background-color:var(--primary-color);color:white;text-decoration:none;border-radius:5px;font-weight:700;transition:background-color .2s,transform .2s}.example-link:hover{background-color:var(--accent-color);transform:scale(1.05)}.app-card-header h3{margin:0;color:white;font-size:1.4rem}.app-card-body{padding:25px;flex-grow:1;display:flex;flex-direction:column}
 
 
 
 
 
 
 
1
  /* --- Google Font 與全域設定 --- */
2
+ @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap');
3
 
4
  :root {
5
  --primary-color: #005f73;
6
  --secondary-color: #0a9396;
7
+ --highlight-color: #94d2bd;
8
+ --accent-color: #ee9b00;
9
+ --bg-light: #f8f9fa;
10
+ --bg-dark: #343a40;
11
+ --text-primary: #212529;
12
+ --text-secondary: #6c757d;
13
+ --border-color: #dee2e6;
14
+ --shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05);
15
+ --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.05);
16
  }
17
 
18
  html {
19
  scroll-behavior: smooth;
20
+ scroll-padding-top: 80px; /* 避免導覽列遮擋標題 */
21
  }
22
 
23
  body {
24
  font-family: 'Noto Sans TC', sans-serif;
25
+ font-weight: 400;
26
+ line-height: 1.8;
27
+ margin: 0;
28
+ padding: 0;
29
+ background: var(--bg-light);
30
+ color: var(--text-primary);
31
+ }
32
+
33
+ /* --- 導覽列 --- */
34
+ .navbar {
35
+ background-color: rgba(255, 255, 255, 0.85);
36
+ backdrop-filter: blur(10px);
37
+ border-bottom: 1px solid var(--border-color);
38
+ padding: 1rem 1.5rem;
39
+ position: sticky;
40
+ top: 0;
41
+ z-index: 1000;
42
+ transition: box-shadow 0.3s;
43
+ }
44
+ .nav-container {
45
+ max-width: 1100px;
46
+ margin: 0 auto;
47
+ display: flex;
48
+ justify-content: space-between;
49
+ align-items: center;
50
+ }
51
+ .nav-logo {
52
+ font-size: 1.5rem;
53
+ font-weight: 700;
54
+ color: var(--primary-color);
55
+ text-decoration: none;
56
+ }
57
+ .nav-menu {
58
+ list-style: none;
59
+ display: flex;
60
+ gap: 1rem;
61
+ margin: 0;
62
+ padding: 0;
63
+ }
64
+ .nav-link {
65
+ color: var(--text-secondary);
66
+ text-decoration: none;
67
+ font-weight: 500;
68
+ padding: 0.5rem 1rem;
69
+ border-radius: 6px;
70
+ position: relative;
71
+ transition: color 0.3s;
72
+ }
73
+ .nav-link:hover,
74
+ .nav-link.active {
75
+ color: var(--primary-color);
76
+ }
77
+ .nav-link::after {
78
+ content: '';
79
+ position: absolute;
80
+ width: 0;
81
+ height: 3px;
82
+ bottom: -5px;
83
+ left: 50%;
84
+ transform: translateX(-50%);
85
+ background-color: var(--secondary-color);
86
+ border-radius: 2px;
87
+ transition: width 0.3s ease-in-out;
88
+ }
89
+ .nav-link:hover::after,
90
+ .nav-link.active::after {
91
+ width: 60%;
92
+ }
93
+
94
+ /* --- Header --- */
95
+ header {
96
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
97
+ color: #fff;
98
+ padding: 5rem 2rem;
99
+ text-align: center;
100
+ position: relative;
101
+ overflow: hidden;
102
+ }
103
+ .header-content h1 {
104
+ font-size: 3.2rem;
105
+ font-weight: 700;
106
+ margin-bottom: 0.5rem;
107
+ }
108
+
109
+ /* --- Main Content & Sections --- */
110
+ main {
111
+ padding: 2rem 1rem;
112
+ max-width: 1000px;
113
+ margin: 0 auto;
114
+ }
115
+ section {
116
+ background: #fff;
117
+ margin-bottom: 2.5rem;
118
+ padding: 2rem 2.5rem;
119
+ border-radius: 16px;
120
+ box-shadow: var(--shadow);
121
+ opacity: 0;
122
+ transform: translateY(30px);
123
+ transition: opacity 0.6s ease-out, transform 0.6s ease-out;
124
+ }
125
+ section.visible {
126
+ opacity: 1;
127
+ transform: translateY(0);
128
+ }
129
+ h2 {
130
+ color: var(--primary-color);
131
+ text-align: center;
132
+ font-size: 2.2rem;
133
+ font-weight: 700;
134
+ margin-bottom: 2.5rem;
135
+ position: relative;
136
+ padding-bottom: 1rem;
137
+ }
138
+ h2::after {
139
+ content: '';
140
+ position: absolute;
141
+ width: 80px;
142
+ height: 4px;
143
+ bottom: 0;
144
+ left: 50%;
145
+ transform: translateX(-50%);
146
+ background-color: var(--highlight-color);
147
+ border-radius: 2px;
148
+ }
149
+ p, li {
150
+ font-size: 1.1rem;
151
+ margin-bottom: 1rem;
152
+ }
153
+ strong {
154
+ color: var(--primary-color);
155
+ font-weight: 700;
156
  }
157
 
 
158
 
159
+ /* --- ★★★★★ 最終版圖片顯示樣式 ★★★★★ --- */
160
  .figure-container {
161
  margin: 20px 0;
162
  padding: 0;
163
  }
164
+ .figure-container a {
165
+ display: block; /* 讓連結成為可點擊的區塊 */
166
+ text-decoration: none;
167
+ }
168
  .figure-container img {
169
+ display: block;
170
+ box-sizing: border-box;
171
+ max-width: 100%;
172
+ width: 100%;
173
+ height: auto;
174
  margin: 15px auto;
175
  border: 1px solid var(--border-color);
176
  border-radius: 8px;
177
+ cursor: zoom-in;
178
  transition: box-shadow 0.3s;
179
  }
180
  .figure-container img:hover {
181
  box-shadow: var(--shadow-lg);
182
  }
 
183
  .figure-container figcaption {
184
  margin-top: 10px;
185
  font-size: .9rem;
 
191
  border-radius: 4px;
192
  }
193
 
194
+
195
+ /* --- ★★★★★ 燈箱 (Lightbox) 樣式 ★★★★★ --- */
196
  .lightbox {
197
  position: fixed;
198
  top: 0;
 
210
  cursor: zoom-out;
211
  animation: fadeIn 0.3s ease;
212
  }
 
213
  .lightbox.closing {
214
  animation: fadeOut 0.3s ease forwards;
215
  }
 
216
  .lightbox img {
217
  max-width: 100%;
218
  max-height: 100%;
219
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
220
  border-radius: 8px;
221
  }
 
222
  @keyframes fadeIn {
223
  from { opacity: 0; }
224
  to { opacity: 1; }
225
  }
 
226
  @keyframes fadeOut {
227
  from { opacity: 1; }
228
  to { opacity: 0; }
229
  }
230
 
231
 
232
+ /* --- 其他元件樣式 --- */
233
+ .table-container {
234
+ border: 1px solid var(--border-color);
235
+ border-radius: 8px;
236
+ overflow: hidden;
237
+ margin-top: 1.5rem;
238
+ }
239
+ table {
240
+ width: 100%;
241
+ border-collapse: collapse;
242
+ }
243
+ th, td {
244
+ padding: 15px;
245
+ text-align: left;
246
+ border: 1px solid var(--border-color);
247
+ }
248
+ thead {
249
+ background-color: var(--primary-color);
250
+ color: #fff;
251
+ font-weight: 500;
252
+ }
253
+ tbody tr:nth-of-type(even) {
254
+ background-color: var(--bg-light);
255
+ }
256
+ td.category {
257
+ background-color: #e0f7fa;
258
+ font-weight: 700;
259
+ color: var(--primary-color);
260
+ vertical-align: middle;
261
+ }
262
+ td i {
263
+ color: var(--text-secondary);
264
+ font-size: 0.9em;
265
+ }
266
+
267
+ .interpretation-methods, .case-study-steps {
268
+ display: grid;
269
+ grid-template-columns: 1fr;
270
+ gap: 30px;
271
+ margin-top: 20px;
272
+ }
273
+ @media (min-width: 768px) {
274
+ .interpretation-methods, .case-study-steps {
275
+ grid-template-columns: 1fr 1fr;
276
+ }
277
+ }
278
+ .interp-item {
279
+ padding: 25px;
280
+ border-radius: 12px;
281
+ background-color: var(--bg-light);
282
+ border: 1px solid var(--border-color);
283
+ }
284
+
285
+ .constraints-levels {
286
+ display: flex;
287
+ flex-direction: column;
288
+ gap: 1rem;
289
+ margin-top: 1.5rem;
290
+ }
291
+ .level-item {
292
+ padding: 1.5rem;
293
+ border-left: 5px solid;
294
+ border-radius: 8px;
295
+ }
296
+ .level-item:nth-of-type(1) { border-color: #ae2012; background-color: #fff1f0; }
297
+ .level-item:nth-of-type(2) { border-color: #ee9b00; background-color: #fff9eb; }
298
+ .level-item:nth-of-type(3) { border-color: #005f73; background-color: #e0f7fa; }
299
+
300
+ .case-study {
301
+ background-color: var(--bg-dark);
302
+ color: var(--bg-light);
303
+ border-radius: 16px;
304
+ border: none;
305
+ }
306
+ .case-study h2 { color: #fff; }
307
+ .step {
308
+ background-color: #495057;
309
+ padding: 25px;
310
+ border-radius: 12px;
311
+ }
312
+ .step h3 { color: var(--highlight-color); }
313
+
314
+ .app-grid-expanded {
315
+ display: grid;
316
+ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
317
+ gap: 25px;
318
+ margin-top: 20px;
319
+ }
320
+ .app-card {
321
+ background: #fff;
322
+ border: 1px solid var(--border-color);
323
+ border-radius: 12px;
324
+ box-shadow: var(--shadow);
325
+ display: flex;
326
+ flex-direction: column;
327
+ transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
328
+ }
329
+ .app-card:hover {
330
+ transform: translateY(-8px);
331
+ box-shadow: var(--shadow-lg);
332
+ }
333
+ .app-card-header {
334
+ background-color: var(--secondary-color);
335
+ color: white;
336
+ padding: 15px 20px;
337
+ border-top-left-radius: 12px;
338
+ border-top-right-radius: 12px;
339
+ }
340
+ .app-card-header h3 { margin: 0; color: white; font-size: 1.4rem; }
341
+ .app-card-body {
342
+ padding: 25px;
343
+ flex-grow: 1;
344
+ display: flex;
345
+ flex-direction: column;
346
+ }
347
+ .app-card-body ul { flex-grow: 1; }
348
+ .example-link {
349
+ display: inline-block;
350
+ margin-top: 15px;
351
+ padding: 10px 18px;
352
+ background-color: var(--primary-color);
353
+ color: white;
354
+ text-decoration: none;
355
+ border-radius: 5px;
356
+ font-weight: 700;
357
+ transition: background-color 0.2s, transform 0.2s;
358
+ }
359
+ .example-link:hover {
360
+ background-color: var(--accent-color);
361
+ transform: scale(1.05);
362
+ }
363
+
364
+ .special-topic-section {
365
+ background-color: #f7feff;
366
+ border-left: 5px solid var(--secondary-color);
367
+ }
368
+ .topic-grid {
369
+ display: grid;
370
+ grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
371
+ gap: 2rem;
372
+ }
373
+ .topic-item {
374
+ background-color: #fff;
375
+ padding: 1.5rem;
376
+ border-radius: 12px;
377
+ box-shadow: var(--shadow);
378
+ border-top: 4px solid var(--highlight-color);
379
+ }
380
+ .topic-item h3 {
381
+ font-size: 1.5rem;
382
+ color: var(--primary-color);
383
+ border-bottom: 2px solid var(--border-color);
384
+ padding-bottom: 0.5rem;
385
+ margin-bottom: 1rem;
386
+ }
387
+ .topic-item h4 {
388
+ font-size: 1.2rem;
389
+ color: var(--secondary-color);
390
+ font-style: italic;
391
+ }
392
+ .summary-text {
393
+ text-align: center;
394
+ font-size: 1.2rem;
395
+ font-weight: 500;
396
+ }
397
+
398
+ /* --- Back to Top Button --- */
399
+ .back-to-top {
400
+ position: fixed;
401
+ bottom: 20px;
402
+ right: 20px;
403
+ background-color: var(--primary-color);
404
+ color: white;
405
+ width: 50px;
406
+ height: 50px;
407
+ border-radius: 50%;
408
+ display: flex;
409
+ justify-content: center;
410
+ align-items: center;
411
+ text-decoration: none;
412
+ box-shadow: var(--shadow-lg);
413
+ opacity: 0;
414
+ visibility: hidden;
415
+ transform: translateY(20px);
416
+ transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.3s;
417
+ }
418
+ .back-to-top.visible {
419
+ opacity: 1;
420
+ visibility: visible;
421
+ transform: translateY(0);
422
+ }
423
+ .back-to-top:hover {
424
+ background-color: var(--accent-color);
425
+ }
426
+ .back-to-top svg {
427
+ width: 24px;
428
+ height: 24px;
429
+ }
430
 
431
+ /* --- Footer --- */
432
+ footer {
433
+ text-align: center;
434
+ padding: 2rem;
435
+ margin-top: 2rem;
436
+ background: var(--bg-dark);
437
+ color: var(--bg-light);
438
+ }