/
style.css
501 lines (409 loc) · 7.94 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
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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
/* Traditional Chinese Font */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@500&display=swap");
/* font-family: 'Noto Sans TC', sans-serif; */
/* English Font */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");
/* font-family: "Poppins", sans-serif; */
* {
margin: 0;
padding: 0;
}
body {
font-family: "Poppins", sans-serif;
}
html {
scroll-behavior: smooth;
}
p {
color: rgb(85, 85, 85);
}
.zh {
font-family: "Noto Sans TC", sans-serif;
}
.highlight-text {
font-size: 2rem;
}
/* TRANSITION */
a,
.btn {
transition: all 300ms ease;
}
/* DESKTOP NAV */
/* Concepts about the nav part */
/* 1. flex */
/* 2. justify-content (https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) */
/* 3. align-items */
/* 4. vh, vw */
/* 5. gap */
/* 6. list-style */
/* 7. font-size */
/* 8. text-decoration (https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) */
/* 9. text-underline-offset */
/* 10. cursor */
nav,
.nav-links {
display: flex; /* 讓nav, .nav-links中的元素由左向右排列 */
}
nav {
justify-content: space-around; /* 讓內部元素平均分配寬度和間距 */
align-items: center;
height: 17vh;
}
.nav-links {
gap: 3rem;
list-style: none; /* 去除list中,項目的標號 */
font-size: 1.5rem;
}
a {
color: black;
text-decoration: none;
/* text-decoration-color: white; */
/* 有將text-decoration設置成none應該就不用設置顏色 */
}
a:hover {
color: grey;
text-decoration: underline;
text-underline-offset: 1rem;
text-decoration-color: rgb(181, 181, 181);
}
.logo {
font-size: 2rem;
}
.logo:hover {
cursor: default; /* 讓游標移到logo時,不會變反白的樣子 */
}
/* HAMBURGER MENU */
/* 1. media query */
/* 2. position (https://www.youtube.com/watch?v=k4s6ynrkw6A) */
/* 3. absolute position inside relative position (https://css-tricks.com/absolute-positioning-inside-relative-positioning/) */
/* 4. transition */
/* 5. transform */
#hamburger-nav {
display: none;
}
.hamburger-menu {
position: relative; /* .hamburger-menu與.menu-links定位互相搭配 */
display: inline-block;
}
.hamburger-icon {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 24px;
width: 30px;
cursor: pointer;
}
.hamburger-icon span {
width: 100%;
height: 2px;
background-color: black;
transition: all 0.3 ease-in-out;
transition-duration: 500ms;
}
.menu-links {
position: absolute; /* .hamburger-menu與.menu-links定位互相搭配 */
right: 0;
background-color: white;
width: fit-content;
max-height: 0;
overflow: hidden;
transition: all 0.3 ease-in-out;
transition-duration: 500ms;
}
.menu-links a {
display: block;
padding: 10px;
text-align: center;
font-size: 1.5rem;
color: black;
text-decoration: none;
transition: all 0.3 ease-in-out;
transition-duration: 500ms;
}
.menu-links li {
list-style: none;
}
.menu-links.open {
max-height: 300px;
}
.hamburger-icon.open span:first-child {
transform: rotate(45deg) translate(10px, 5px); /* 旋轉又平移 */
transition-duration: 500ms;
}
.hamburger-icon.open span:nth-child(2) {
opacity: 0;
}
.hamburger-icon.open span:last-child {
transform: rotate(-45deg) translate(10px, -5px); /* 旋轉又平移 */
transition-duration: 500ms;
}
.hamburger-icon span:first-child {
transform: none;
}
.hamburger-icon span:first-child {
opacity: 1;
}
.hamburger-icon span:first-child {
transform: none;
}
/* SECTIONS */
/* 1. Box Model */
section {
padding-top: 4vh;
margin: 0 10rem 10rem;
box-sizing: border-box;
min-height: fit-content;
}
.section-container {
display: flex;
gap: 4rem;
height: 80%;
}
/* PROFILE SECTION */
#profile {
display: flex; /* 讓#profile 中的元素,由左至右排列 */
justify-content: center; /* 內部各個元素置中 */
gap: 5rem; /* 設定各個元素間隔 */
height: 75vh;
margin-bottom: 8vh;
}
.section__pic-container {
display: flex;
height: 500px;
width: 500px;
margin: auto 0;
}
.section__text {
align-self: center;
text-align: center;
}
.section__text p {
font-weight: 600;
}
.section__text__p1 {
text-align: center;
}
.section__text__p2 {
font-size: 1.75rem;
margin-bottom: 1rem;
}
.title {
font-size: 3rem;
text-align: center;
}
#socials-container {
display: flex;
justify-content: center;
margin-top: 2rem;
margin-bottom: 1.5rem;
gap: 1rem;
}
/* ICONS */
.icon {
cursor: pointer;
height: 2rem;
}
/* BUTTONS */
.btn-container {
display: flex;
justify-content: center;
gap: 1rem;
}
.btn {
font-weight: 600;
transition: all 300ms ease;
padding: 1rem;
width: 8rem;
border-radius: 2rem;
}
.btn-color-1,
.btn-color-2 {
border: rgb(53, 53, 53) 0.1rem solid;
}
.btn-color-1:hover,
.btn-color-2:hover {
cursor: pointer;
}
.btn-color-1,
.btn-color-2:hover {
background: rgb(53, 53, 53);
color: white;
}
.btn-color-1:hover {
background: rgb(0, 0, 0);
}
.btn-color-2 {
background: none;
}
.btn-color-2:hover {
border: rgb(255, 255, 255) 0.1rem solid;
}
.btn-container {
gap: 1rem;
}
.arrow {
position: absolute;
right: -5rem;
bottom: 2.5rem;
}
.quote {
text-align: center;
font-size: 1.2rem;
}
/* ABOUT SECTION */
#about {
position: relative;
}
.about-pic {
border-radius: 2rem;
}
.about-details-container {
display: flex;
justify-content: center;
flex-direction: column;
width: 100%;
}
.text-container {
display: flex;
justify-content: center;
font-size: 1.2rem;
}
.about-containers {
display: flex;
flex-wrap: wrap;
gap: 2rem;
margin-bottom: 2rem;
margin-top: 2rem;
justify-content: center;
}
.details-container {
padding: 1.5rem;
flex: 1;
background: white;
border-radius: 2rem;
border: rgb(53, 53, 53) 0.1rem solid;
border-color: rgb(163, 163, 163);
text-align: center;
min-width: 15rem;
max-width: 20rem;
}
.details-container h3 {
font-size: 1.3rem;
}
.details-container-text {
padding: 1rem;
min-width: 10rem;
font-size: 1.15rem;
}
/* EXPERIENCE SECTION */
#experience {
position: relative;
}
.experience-sub-title {
color: rgb(85, 85, 85);
font-weight: 600;
font-size: 1.5rem;
margin-bottom: 2rem;
}
.experience-details-container {
display: flex;
justify-content: center;
flex-direction: column;
}
.experience-containers {
display: flex;
gap: 2rem;
margin-bottom: 2rem;
margin-top: 2rem;
justify-content: center;
}
.experience-containers .details-container {
padding: 1.5rem;
flex: 1;
background: white;
border-radius: 2rem;
border: rgb(53, 53, 53) 0.1rem solid;
border-color: rgb(163, 163, 163);
text-align: center;
min-width: 15rem;
max-width: 30rem;
}
.article-container {
display: flex;
text-align: initial;
flex-wrap: wrap;
gap: 2.5rem;
justify-content: space-around;
}
article {
display: flex;
width: 10rem;
justify-content: start;
gap: 0.5rem;
}
article .icon {
cursor: default;
}
/* PROJECTS SECTION */
#projects {
position: relative;
height: fit-content;
}
.color-container {
border-color: rgb(163, 163, 163);
background: rgb(250, 250, 250);
}
.project-img {
border-radius: 2rem;
width: 90%;
height: 90%;
}
.project-title {
margin: 1rem;
color: black;
}
.project-btn {
color: black;
border-color: rgb(163, 163, 163);
}
/* CONTACT */
#contact {
display: flex;
justify-content: center;
flex-direction: column;
height: 70vh;
}
.contact-info-upper-container {
display: flex;
justify-content: center;
border-radius: 2rem;
border: rgb(53, 53, 53) 0.1rem solid;
border-color: rgb(163, 163, 163);
background: (250, 250, 250);
margin: 2rem auto;
padding: 0.5rem;
}
.contact-info-container {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
margin: 1rem;
}
.contact-info-container p {
font-size: larger;
}
.contact-icon {
cursor: default;
}
.email-icon {
height: 2.5rem;
}
/* FOOTER SECTION */
footer {
height: 26vh;
margin: 0 1rem;
}
footer p {
text-align: center;
}