-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
193 lines (167 loc) · 3.09 KB
/
styles.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
/* 全局样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
background: #f5f7fa;
color: #2d3436;
line-height: 1.6;
}
/* 容器样式 */
.grid-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
padding: 25px;
max-width: 1200px;
margin: 0 auto;
}
/* 卡片样式 */
.grid-item {
background: #ffffff;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease, box-shadow 0.3s ease;
position: relative;
max-width: 600px;
margin: 0 auto;
width: 100%;
}
.grid-item:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.grid-item a {
text-decoration: none;
color: inherit;
display: block;
}
/* 图片容器 */
.image-container {
position: relative;
overflow: hidden;
padding-top: 60%;
}
.grid-item img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s ease;
max-width: 100%;
height: auto;
}
.grid-item:hover img {
transform: scale(1.05);
}
/* 内容区域 */
.content {
padding: 15px;
}
.grid-item h2 {
font-size: 1.2rem;
color: #2d3436;
margin-bottom: 8px;
font-weight: 600;
position: relative;
}
.grid-item h2::after {
content: '';
position: absolute;
left: 0;
bottom: -5px;
width: 40px;
height: 3px;
background: #00b894;
transition: width 0.3s ease;
}
.grid-item:hover h2::after {
width: 60px;
}
.grid-item p {
color: #636e72;
font-size: 0.9rem;
margin-top: 12px;
line-height: 1.6;
}
/* 标签样式 */
.tags {
display: flex;
gap: 8px;
margin-top: 15px;
}
.tag {
background: #e5f7f4;
color: #00b894;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 500;
}
/* 响应式设计 */
@media (max-width: 768px) {
.grid-container {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
padding: 12px;
gap: 15px;
}
.grid-item h2 {
font-size: 1.3rem;
}
}
/* 添加加载动画 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.grid-item {
animation: fadeIn 0.6s ease forwards;
}
.personal-info {
max-width: 800px;
margin: 40px auto;
padding: 0 20px;
text-align: center;
}
.name {
font-size: 2.5em;
margin-bottom: 20px;
}
.bio {
font-size: 1.1em;
line-height: 1.6;
color: #666;
margin-bottom: 40px;
}
.social-links {
text-align: center;
padding: 2rem 0;
margin-top: 2rem;
}
.twitter-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: #1DA1F2; /* Twitter 蓝色 */
text-decoration: none;
font-size: 1.1rem;
}
.twitter-icon {
width: 24px;
height: 24px;
}
.twitter-link:hover {
opacity: 0.8;
}