-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
152 lines (128 loc) · 2.47 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
/* 定义全局色板 */
:root {
--primary-color: #71b3dd;
--primary-dark-color: #4489b5;
--text-color-gray: #8b979f;
--text-color-light-gray: #c1c7cb;
--text-color-dark-gray: #5a6f7c;
}
/* 全局样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
color: var(--text-color-dark-gray);
}
.container {
width: 210mm; /* A4纸宽度 */
margin: auto;
padding: 20mm;
box-shadow: 0px 10px 20px 5px lightgrey;
display: flex;
flex-direction: column;
justify-content: space-between;
}
/* 头部样式 */
h1 {
text-align: center;
color: var(--primary-dark-color);
}
h2 {
color: var(--primary-dark-color);
border-bottom: 2px solid var(--primary-color);
padding-bottom: 5px;
margin-bottom: 10px;
}
h3 {
margin-top: 10px;
color: var(--primary-dark-color);
}
h4 {
margin-top: 5px;
color: var(--text-color-dark-gray);
}
h5 {
margin-top: 5px;
font-style: italic;
color: var(--text-color-gray);
}
/* 信息内容样式 */
.info-content {
display: flex;
flex-direction: column;
gap: 20px;
}
/* 基本信息样式 */
.basic-info {
display: flex;
justify-content: space-between;
align-items: center;
}
.basic-info .content {
flex: 3;
}
.basic-info aside {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.basic-info img {
width: 100px;
height: 100/0.618px;
border-radius: 40%;
object-fit: cover;
}
/* 各个部分样式 */
.education, .work-exp, .projects, .skills {
padding: 10px 0;
}
ul {
padding-left: 20px;
}
ul li {
margin-bottom: 10px;
}
/* 页脚样式 */
footer {
text-align: center;
padding: 10px 0;
}
footer ul {
display: flex;
justify-content: center;
list-style: none;
padding: 0;
margin: 0;
}
footer ul li {
margin: 0 10px;
}
footer .fab {
color: var(--primary-color);
font-size: 24px;
}
/* 鼠标悬停效果 */
h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, div p:hover {
color: var(--primary-color);
}
/* 打印样式 */
@media print {
body, .container {
box-shadow: none;
width: auto;
height: auto;
margin: 0;
padding: 0;
}
h2, h3, h4, h5, p {
page-break-after: avoid; /* 避免元素后分页 */
}
.container {
page-break-before: always; /* 页面开始前分页 */
}
}
/* 分页样式 */
.page-break {
page-break-before: always; /* 强制分页 */
}