cwadayi commited on
Commit
810fad0
·
verified ·
1 Parent(s): 0111a50

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +167 -169
style.css CHANGED
@@ -1,217 +1,215 @@
1
- /* --- 互動與可讀性提升 --- */
2
- /* 引入 Google Font */
3
- @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;700&display=swap');
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
- /* 平滑捲動 */
6
  html {
7
  scroll-behavior: smooth;
 
8
  }
9
 
10
  body {
11
- /* 更換為更易讀的字體 */
12
  font-family: 'Noto Sans TC', sans-serif;
13
- line-height: 1.8; /* 增加行高 */
 
14
  margin: 0;
15
  padding: 0;
16
- background: #f8f9fa; /* 使用更柔和的背景色 */
17
- color: #343a40; /* 深灰色文字,對比更舒適 */
18
  }
19
 
20
- /* --- 導覽列樣式 --- */
21
  .navbar {
22
- background-color: rgba(255, 255, 255, 0.9);
23
  backdrop-filter: blur(10px);
24
- -webkit-backdrop-filter: blur(10px);
25
- border-bottom: 1px solid #e9ecef;
26
- padding: 10px 20px;
27
  position: sticky;
28
  top: 0;
29
  z-index: 1000;
30
- width: 100%;
31
- box-shadow: 0 2px 10px rgba(0,0,0,0.05);
32
- }
33
- .nav-container {
34
- max-width: 1000px;
35
- margin: 0 auto;
36
- display: flex;
37
- justify-content: space-between;
38
- align-items: center;
39
- }
40
- .nav-logo {
41
- font-size: 1.5rem;
42
- font-weight: 700;
43
- color: #005f73;
44
- text-decoration: none;
45
  }
46
- .nav-menu {
47
- list-style: none;
48
- display: flex;
49
- gap: 20px;
50
- margin: 0;
51
- padding: 0;
52
  }
 
 
 
53
  .nav-link {
54
- color: #495057;
55
  text-decoration: none;
56
- font-weight: 700;
57
- padding: 5px 10px;
58
- border-radius: 5px;
59
- transition: color 0.3s, background-color 0.3s;
60
- }
61
- .nav-link:hover {
62
- color: #fff;
63
- background-color: #0a9396;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
 
66
- /* --- 原有樣式優化 --- */
67
  header {
68
- background: #005f73;
69
  color: #fff;
70
- padding: 4rem 2rem;
71
  text-align: center;
72
- border-bottom: 5px solid #94d2bd;
 
73
  }
74
- header h1 {
75
- margin: 0;
76
- font-size: 3rem;
77
  font-weight: 700;
78
- }
79
- main {
80
- padding: 20px;
81
- max-width: 1000px;
82
- margin: 0 auto;
83
  }
84
 
85
- /* 動態載入效果 */
 
86
  section {
87
  background: #fff;
88
- margin-bottom: 30px;
89
- padding: 30px 40px;
90
- border-radius: 12px;
91
- box-shadow: 0 4px 15px rgba(0,0,0,0.05);
92
  opacity: 0;
93
- transform: translateY(20px);
94
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
95
  }
96
- section.visible {
97
- opacity: 1;
98
- transform: translateY(0);
99
- }
100
-
101
  h2 {
102
- color: #0a9396;
103
- border-bottom: 3px solid #e9ecef;
104
- padding-bottom: 15px;
105
  text-align: center;
106
  font-size: 2.2rem;
107
  font-weight: 700;
108
- }
109
- p, li {
110
- font-size: 1.1rem;
111
- margin-bottom: 1.2rem;
112
- }
113
- strong {
114
- color: #005f73;
115
- }
 
 
 
 
 
 
 
 
116
 
117
- /* 圖片互動效果 */
118
- .figure-container img {
119
- max-width: 100%;
120
- height: auto;
121
- display: block;
122
- margin: 15px auto;
123
- border: 1px solid #ccc;
124
- border-radius: 8px;
125
- transition: transform 0.3s ease, box-shadow 0.3s ease;
126
- }
127
- .figure-container img:hover {
128
- transform: scale(1.03);
129
- box-shadow: 0 5px 20px rgba(0,0,0,0.15);
130
- }
131
- .table-container { overflow-x: auto; }
132
- table { width: 100%; border-collapse: collapse; margin-top: 20px; }
133
- th, td { padding: 15px; text-align: left; border: 1px solid #dee2e6; }
134
- thead { background-color: #00796b; color: #fff; }
135
- tbody tr:nth-of-type(even) { background-color: #f8f9fa; }
136
 
137
- /* 工程應用卡片 */
138
- .app-card {
139
- background: #fff;
140
- border: 1px solid #e9ecef;
141
- border-radius: 12px;
142
- box-shadow: 0 4px 15px rgba(0,0,0,0.05);
143
- display: flex;
144
- flex-direction: column;
145
- transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
146
- }
147
- .app-card:hover {
148
- transform: translateY(-8px);
149
- box-shadow: 0 8px 25px rgba(0,0,0,0.1);
150
- }
151
- .app-card-body ul { flex-grow: 1; }
152
- .example-link {
153
- display: inline-block;
154
- margin-top: 15px;
155
- padding: 10px 18px;
156
- background-color: #005f73;
157
- color: white;
158
- text-decoration: none;
159
- border-radius: 5px;
160
- font-weight: 700;
161
- transition: background-color 0.2s, transform 0.2s;
162
- }
163
- .example-link:hover {
164
- background-color: #0a9396;
165
- transform: scale(1.05);
166
  }
167
-
168
- /* --- 新增:地熱探勘專題章節樣式 --- */
169
- .special-topic-section {
170
- background-color: #eef7f7; /* 淡雅的背景色 */
171
- border-left: 5px solid #00796b;
172
- }
173
-
174
- .special-topic-section h3 {
175
- color: #00796b;
176
- font-size: 1.8rem;
177
- margin-top: 2rem;
178
- margin-bottom: 1rem;
179
- padding-bottom: 0.5rem;
180
- border-bottom: 2px solid #94d2bd;
181
- }
182
-
183
- .special-topic-section h4 {
184
- color: #005f73;
185
- font-size: 1.3rem;
186
- font-style: italic;
187
- margin-top: 1.5rem;
188
  }
 
 
 
189
 
190
- .topic-item {
191
- margin-bottom: 2rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  }
 
 
 
193
 
194
- /* 確保其他樣式一致 (從舊版複製並微調) */
195
- .interpretation-methods, .case-study-steps { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 20px; }
196
- @media (min-width: 768px) { .interpretation-methods, .case-study-steps { grid-template-columns: 1fr 1fr; } }
197
- .interp-item { padding: 25px; border-radius: 8px; background-color: #f8f9fa; border: 1px solid #e9ecef; }
198
- .constraints-levels { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
199
- .level-item { padding: 20px; border-left: 5px solid; border-radius: 5px; }
200
- .level-item:nth-of-type(1) { border-color: #ae2012; background-color: #fff1f0; }
201
- .level-item:nth-of-type(2) { border-color: #ee9b00; background-color: #fff9eb; }
202
- .level-item:nth-of-type(3) { border-color: #005f73; background-color: #e0f7fa; }
203
- .case-study { background-color: #495057; color: #f8f9fa; border-radius: 12px; border: 3px solid #94d2bd; }
204
- .case-study h2 { color: #e9ecef; }
205
- .step { background-color: #343a40; padding: 25px; border-radius: 8px; }
206
- .step h3 { color: #94d2bd; }
207
- .app-grid-expanded { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; margin-top: 20px; }
208
- .app-card-header { background-color: #00796b; color: white; padding: 15px; border-top-left-radius: 12px; border-top-right-radius: 12px; }
209
- .app-card-header h3 { margin: 0; color: white; font-size: 1.4rem; }
210
- .app-card-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
211
  footer {
212
  text-align: center;
213
- padding: 30px;
214
- margin-top: 40px;
215
- background: #343a40;
216
- color: #e9ecef;
217
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ .navbar.scrolled {
45
+ box-shadow: var(--shadow);
 
 
 
 
46
  }
47
+ .nav-container { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
48
+ .nav-logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }
49
+ .nav-menu { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
50
  .nav-link {
51
+ color: var(--text-secondary);
52
  text-decoration: none;
53
+ font-weight: 500;
54
+ padding: 0.5rem 1rem;
55
+ border-radius: 6px;
56
+ position: relative;
57
+ transition: color 0.3s;
58
+ }
59
+ .nav-link:hover, .nav-link.active {
60
+ color: var(--primary-color);
61
+ }
62
+ .nav-link::after {
63
+ content: '';
64
+ position: absolute;
65
+ width: 0;
66
+ height: 3px;
67
+ bottom: -5px;
68
+ left: 50%;
69
+ transform: translateX(-50%);
70
+ background-color: var(--secondary-color);
71
+ border-radius: 2px;
72
+ transition: width 0.3s ease-in-out;
73
+ }
74
+ .nav-link:hover::after, .nav-link.active::after {
75
+ width: 60%;
76
  }
77
 
78
+ /* --- Header --- */
79
  header {
80
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
81
  color: #fff;
82
+ padding: 5rem 2rem;
83
  text-align: center;
84
+ position: relative;
85
+ overflow: hidden;
86
  }
87
+ .header-content h1 {
88
+ font-size: 3.2rem;
 
89
  font-weight: 700;
90
+ margin-bottom: 0.5rem;
 
 
 
 
91
  }
92
 
93
+ /* --- Main Content & Sections --- */
94
+ main { padding: 2rem 1rem; max-width: 1000px; margin: 0 auto; }
95
  section {
96
  background: #fff;
97
+ margin-bottom: 2.5rem;
98
+ padding: 2rem 2.5rem;
99
+ border-radius: 16px;
100
+ box-shadow: var(--shadow);
101
  opacity: 0;
102
+ transform: translateY(30px);
103
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
104
  }
105
+ section.visible { opacity: 1; transform: translateY(0); }
 
 
 
 
106
  h2 {
107
+ color: var(--primary-color);
 
 
108
  text-align: center;
109
  font-size: 2.2rem;
110
  font-weight: 700;
111
+ margin-bottom: 2.5rem;
112
+ position: relative;
113
+ padding-bottom: 1rem;
114
+ }
115
+ h2::after {
116
+ content: '';
117
+ position: absolute;
118
+ width: 80px;
119
+ height: 4px;
120
+ bottom: 0;
121
+ left: 50%;
122
+ transform: translateX(-50%);
123
+ background-color: var(--highlight-color);
124
+ border-radius: 2px;
125
+ }
126
+ p, li { font-size: 1.1rem; }
127
 
128
+ /* --- Specific Section Styles --- */
129
+ .table-container { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
130
+ .interp-item { border-radius: 12px; }
131
+ .constraints-levels { gap: 1rem; }
132
+ .level-item { padding: 1.5rem; border-radius: 8px; }
133
+ .case-study { background-color: var(--bg-dark); color: var(--bg-light); border-radius: 16px; border: none; }
134
+ .case-study h2 { color: #fff; }
135
+ .step { background-color: #495057; }
136
+ .app-card-header { border-top-left-radius: 12px; border-top-right-radius: 12px; }
 
 
 
 
 
 
 
 
 
 
137
 
138
+ /* 地熱探勘 (優化) */
139
+ .special-topic-section { background-color: #f7feff; border-left: 5px solid var(--secondary-color); }
140
+ .topic-grid {
141
+ display: grid;
142
+ grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
143
+ gap: 2rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  }
145
+ .topic-item {
146
+ background-color: #fff;
147
+ padding: 1.5rem;
148
+ border-radius: 12px;
149
+ box-shadow: var(--shadow);
150
+ border-top: 4px solid var(--highlight-color);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  }
152
+ .topic-item h3 { font-size: 1.5rem; color: var(--primary-color); border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem; margin-bottom: 1rem; }
153
+ .topic-item h4 { font-size: 1.2rem; color: var(--secondary-color); font-style: italic; }
154
+ .summary-text { text-align: center; font-size: 1.2rem; font-weight: 500; }
155
 
156
+ /* --- Back to Top Button --- */
157
+ .back-to-top {
158
+ position: fixed;
159
+ bottom: 20px;
160
+ right: 20px;
161
+ background-color: var(--primary-color);
162
+ color: white;
163
+ width: 50px;
164
+ height: 50px;
165
+ border-radius: 50%;
166
+ display: flex;
167
+ justify-content: center;
168
+ align-items: center;
169
+ text-decoration: none;
170
+ box-shadow: var(--shadow-lg);
171
+ opacity: 0;
172
+ visibility: hidden;
173
+ transform: translateY(20px);
174
+ transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background-color 0.3s;
175
  }
176
+ .back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
177
+ .back-to-top:hover { background-color: var(--accent-color); }
178
+ .back-to-top svg { width: 24px; height: 24px; }
179
 
180
+ /* --- Footer --- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  footer {
182
  text-align: center;
183
+ padding: 2rem;
184
+ margin-top: 2rem;
185
+ background: var(--bg-dark);
186
+ color: var(--bg-light);
187
  }
188
+
189
+ /* 沿用舊版確保相容性 */
190
+ .quote-box{background-color:#e0f7fa;border-left:5px solid #00796b;margin:20px 0;padding:15px 20px;border-radius:5px;font-style:italic;}
191
+ .figure-container img{max-width:100%;height:auto;display:block;margin:15px auto;border:1px solid #ccc;border-radius:8px;transition:transform .3s ease,box-shadow .3s ease;}
192
+ .figure-container img:hover{transform:scale(1.03);box-shadow:0 5px 20px rgba(0,0,0,.15);}
193
+ .figure-container figcaption{margin-top:10px;font-size:.9rem;color:#555;line-height:1.5;text-align:left;padding:10px;background-color:#f8f9fa;border-radius:4px;}
194
+ table{width:100%;border-collapse:collapse;margin-top:20px;}
195
+ th,td{padding:15px;text-align:left;border:1px solid #dee2e6;}
196
+ thead{background-color:#00796b;color:#fff;}
197
+ tbody tr:nth-of-type(even){background-color:#f8f9fa;}
198
+ td.category{background-color:#e0f7fa;font-weight:700;color:#004d40;vertical-align:middle;}
199
+ .interpretation-methods,.case-study-steps{display:grid;grid-template-columns:1fr;gap:30px;margin-top:20px;}
200
+ @media (min-width:768px){.interpretation-methods,.case-study-steps{grid-template-columns:1fr 1fr;}}
201
+ .interp-item{padding:25px;border-radius:8px;background-color:#f8f9fa;border:1px solid #e9ecef;}
202
+ .level-item{padding:20px;border-left:5px solid;border-radius:8px;}
203
+ .level-item:nth-of-type(1){border-color:#ae2012;background-color:#fff1f0;}
204
+ .level-item:nth-of-type(2){border-color:#ee9b00;background-color:#fff9eb;}
205
+ .level-item:nth-of-type(3){border-color:#005f73;background-color:#e0f7fa;}
206
+ .step{background-color:#495057;padding:25px;border-radius:8px;}
207
+ .step h3{color:#94d2bd;}
208
+ .app-grid-expanded{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:25px;margin-top:20px;}
209
+ .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;}
210
+ .app-card:hover{transform:translateY(-8px);box-shadow:var(--shadow-lg);}
211
+ .app-card-body ul{flex-grow:1;}
212
+ .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;}
213
+ .example-link:hover{background-color:var(--accent-color);transform:scale(1.05);}
214
+ .app-card-header h3{margin:0;color:white;font-size:1.4rem;}
215
+ .app-card-body{padding:25px;flex-grow:1;display:flex;flex-direction:column;}