-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
117 lines (105 loc) · 2.32 KB
/
Copy pathstyle.css
File metadata and controls
117 lines (105 loc) · 2.32 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
/* 导航栏样式 */
body {
margin: 0;
font-family: Arial, sans-serif;
}
.navbar {
position: fixed; /* 固定在顶部 */
top: 0;
left: 0;
bottom: 0;
width: 100vw;
height: 10vh;
background-color: white;
overflow: hidden;
z-index: 1000; /* 保证导航栏在最上层 */
border-bottom: 1px solid #ccc;
display: flex;
justify-content: center; /* 水平居中 */
align-items: center;
}
.navbar a {
float: left;
display: block;
color: rgb(45, 43, 43);
text-align: center;
padding: 14px 20px;
text-decoration: none;
transition: background 0.3s;
border-bottom: 3px solid transparent;
}
.navbar a:hover {
border-bottom: 3px solid rgb(45, 43, 43); /* 粗下划线 */
color: rgb(45, 43, 43);
}
.sidebar {
position: fixed;
top: 0;
left: 0;
width: 20vw;
height: 100vh;
background-color: white;
padding: 20px;
box-sizing: border-box;
padding-top: 10%;
/* border-right: 1px solid #ccc; */
display: flex; /* 开启 flex 布局 */
flex-direction: column; /* 元素竖着排列 */
align-items: center; /* ⭐ 水平居中所有子元素 */
text-align: center; /* 让文字也居中 */
}
/* 左侧内容 */
.sidebar img {
width: 30%;
border-radius: 50%;
margin-bottom: 15px;
}
.sidebar h2 {
margin: 1vh 0;
}
.sidebar p, .sidebar a {
margin: 1vh 0;
display: block;
color: #333;
text-decoration: none;
}
.sidebar a:hover {
text-decoration: underline;
}
.main {
margin-left: 20vw; /* 左侧栏宽度 */
margin-top: 10vh;
padding-left: 20px;
padding-right: 20px;
}
.main section {
min-height: 15vh;
padding-top: 1vh;
margin-bottom: 0;
scroll-margin-top: 10vh;
padding-right: 20%;
padding-left: 5%;
}
.main h1 {
font-size: 25px;
}
.main p {
line-height: 2;
}
.hyper_url {
text-align: left;
margin-left: 10%;
margin: 1vh 0;
}
.hyper_url a {
display: block;
margin: 2vh 0;
}
#home { background-color: white; }
#about { background-color: white; }
#news { background-color: white; }
#publications { background-color: white; }
#honer { background-color: white; }
#educations { background-color: white; }
#talk { background-color: white; }
#internships { background-color: white; }