-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
243 lines (196 loc) · 10.7 KB
/
Copy pathstyle.css
File metadata and controls
243 lines (196 loc) · 10.7 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
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
/* 全局重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Inter', 'Arial', 'Microsoft YaHei', sans-serif;
}
:root {
--primary: #44b3d3; /* 主色-改为用户指定的颜色 */
--accent: #f97316; /* 强调色-橙 */
--light: #f8fafc; /* 浅背景 */
--dark: #0f1724; /* 文字主色 */
--muted: #64748b; /* 次要文字 */
--card: #ffffff;
--shadow: 0 8px 30px rgba(8,15,30,0.06);
--glass: rgba(255,255,255,0.6);
}
html, body {
height: 100%;
}
body {
color: var(--dark);
line-height: 1.6;
background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
.container {
width: 92%;
max-width: 1100px;
margin: 0 auto;
}
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
/* 导航栏 */
.navbar {
position: fixed;
top: 16px;
left: 0;
right: 0;
background: rgba(255,255,255,0.9);
backdrop-filter: blur(6px);
padding: 0.6rem 0;
z-index: 999;
transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-wrap { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; gap: 0.6rem; align-items: center; color: var(--primary); font-weight: 700; }
.logo i { color: var(--accent); font-size: 1.45rem; }
.logo-text { font-size: 1.15rem; }
.nav-right { display: flex; gap: 1rem; align-items: center; }
.nav-links { list-style: none; display: flex; gap: 1rem; align-items: center; }
.nav-links a { padding: 0.5rem 0.6rem; color: var(--muted); border-radius: 6px; font-weight: 500; }
.nav-links a:hover, .nav-links a:focus { color: var(--dark); background: rgba(68,179,211,0.06); }
.github-btn { background: var(--primary); color: #fff; padding: 0.45rem 0.9rem; border-radius: 8px; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.5rem; transition: transform 0.18s ease, box-shadow 0.18s; }
.github-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(68,179,211,0.12); }
.nav-toggle { display: none; background: transparent; border: none; cursor: pointer; padding: 0.4rem; border-radius: 8px; color: var(--muted); }
.nav-toggle:focus { outline: 2px solid rgba(37,99,235,0.18); }
/* 核心介绍区 */
.hero { margin-top: 86px; padding: 5rem 0; }
.hero-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; align-items: center; }
.hero-text h1 { font-size: 2.6rem; margin-bottom: 1rem; line-height: 1.05; }
.hero-text h1 span { color: var(--primary) !important; }
.hero-text p { font-size: 1.05rem; color: var(--muted); margin-bottom: 1.6rem; max-width: 520px; }
.hero-ctas { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 1rem; }
.btn { display: inline-block; background: linear-gradient(90deg, var(--primary), #3aa3c1); color: #fff; padding: 0.72rem 1.6rem; border-radius: 10px; font-weight: 700; box-shadow: 0 6px 20px rgba(68,179,211,0.12); transition: transform 0.18s ease, box-shadow 0.18s; }
.btn:hover { transform: translateY(-4px); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid rgba(68,179,211,0.12); padding: 0.6rem 1.2rem; box-shadow: none; }
.hero-ctas .btn:first-child { background: linear-gradient(90deg, var(--primary), #3aa3c1) !important; color: #fff !important; box-shadow: 0 6px 20px rgba(68,179,211,0.12) !important; }
.badges { display: flex; gap: 0.6rem; margin-top: 0.6rem; }
.badge { background: rgba(15,23,36,0.05); color: var(--muted); padding: 0.3rem 0.6rem; border-radius: 999px; font-size: 0.85rem; }
.hero-img img { width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow); transform-origin: center; transition: transform 0.6s cubic-bezier(.2,.9,.2,1); }
.hero-img img:hover { transform: translateY(-6px) rotate(-0.5deg); }
/* 核心功能区 */
.feature { padding: 5rem 0; }
.section-title { font-size: 1.6rem; margin-bottom: 2rem; color: var(--dark); position: relative; text-align: center; }
.section-title::after { content: ''; width: 64px; height: 4px; background: linear-gradient(90deg,var(--accent),var(--primary)); position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); border-radius: 4px; }
.feature-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 1.2rem; }
.feature-card { background: var(--card); padding: 2rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(8,15,30,0.04); transition: transform 0.28s ease, box-shadow 0.28s ease; text-align: left; }
.feature-card i { font-size: 2rem; color: var(--primary); margin-bottom: 0.8rem; display: inline-block; }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; color: var(--dark); }
.feature-card p { color: var(--muted); font-size: 0.95rem; }
.feature-card:hover, .feature-card:focus-within { transform: translateY(-8px); box-shadow: 0 18px 40px rgba(8,15,30,0.08); }
/* 使用步骤 */
.usage { padding: 3.2rem 0 5rem; background: transparent; }
.steps-wrap { max-width: 760px; margin: 0 auto; }
.step-item { display: flex; gap: 1.2rem; margin-bottom: 1.6rem; align-items: flex-start; }
.step-num { width: 42px; height: 42px; background: linear-gradient(180deg,var(--primary),#1d4ed8); color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.step-content h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step-content p { color: var(--muted); }
.step-content code { background: #eef2ff; padding: 0.22rem 0.48rem; border-radius: 6px; font-family: 'Consolas', monospace; font-size: 0.9rem; }
/* 联系 CTA */
.contact-cta { padding: 3.2rem 0; background: linear-gradient(180deg, rgba(68,179,211,0.05), transparent); border-top: 1px solid rgba(15,23,36,0.02); }
.cta-wrap { text-align: center; padding: 2rem; border-radius: 12px; }
.cta-wrap h2 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.cta-wrap p { color: var(--muted); margin-bottom: 1rem; }
/* 页脚 */
.footer { background: linear-gradient(90deg,#0b1220,#08101a); color: #e6eef8; padding: 2.2rem 0; text-align: center; margin-top: 2rem; }
.footer p { margin-bottom: 0.8rem; font-size: 0.92rem; color: #cbd7ea; }
.footer .socials a { color: #cbd7ea; font-size: 1.25rem; margin-left: 0.6rem; }
.footer .socials a:hover { color: var(--accent); }
/* 动画 */
.fade-up { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.in-view { opacity: 1; transform: translateY(0); }
/* 动画关键帧 */
@keyframes navFadeIn {
from { opacity: 0; transform: translateY(-8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
0% { opacity: 0; transform: translateY(12px) scale(.98); }
60% { opacity: 1; transform: translateY(-6px) scale(1.02); }
100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes floatUp {
from { opacity: 0; transform: translateY(18px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes ripple {
to { transform: scale(6); opacity: 0; }
}
/* 强制覆盖:确保关键元素使用主题色,优先级较高以覆盖第三方样式或内联覆盖 */
.hero-text h1 span { color: var(--primary) !important; }
.hero-ctas .btn:first-child { background: linear-gradient(90deg, var(--primary), #3aa3c1) !important; color: #fff !important; box-shadow: 0 6px 20px rgba(68,179,211,0.12) !important; }
/* 强制让 Font Awesome 的伪元素继承颜色(修复 ::before 显示不对的问题) */
.fa::before, .fas::before, .fab::before, .far::before, .fal::before { color: inherit !important; }
/* 移动菜单入场:使用动画而非瞬间出现 */
.nav-links {
/* ...existing properties... */
}
.nav-links.show {
display: flex; /* 已存在,但保持 */
animation: navFadeIn 260ms ease forwards;
}
/* 切换按钮旋转效果 */
.nav-toggle.open i { transform: rotate(90deg); transition: transform 260ms ease; }
/* 卡片及 hero-img 的入场动画(结合 .in-view) */
.feature-card.in-view { animation: popIn 560ms cubic-bezier(.2,.9,.2,1) both; }
.hero-img.in-view { animation: floatUp 700ms cubic-bezier(.2,.9,.2,1) both; }
/* 按钮波纹效果准备 */
.btn { position: relative; overflow: hidden; }
.btn .ripple { position: absolute; width: 12px; height: 12px; background: rgba(255,255,255,0.38); border-radius: 50%; pointer-events: none; transform: scale(0); opacity: 1; animation: ripple 600ms ease-out; }
/* 微交互增强 */
.github-btn, .bili-btn { transition: transform 160ms cubic-bezier(.2,.9,.2,1), box-shadow 160ms; }
.github-btn:active, .bili-btn:active { transform: translateY(1px) scale(.996); }
/* 小细节:让 Font Awesome 图标过渡颜色更平滑 */
.fa, .fas, .fab, .far, .fal { transition: color 180ms ease; }
/* 响应式设计 */
@media (max-width: 1024px) {
.container { max-width: 940px; }
.hero-text h1 { font-size: 2.3rem; }
.feature-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
.nav-toggle { display: inline-flex; }
.nav-links { position: absolute; top: 72px; right: 16px; background: rgba(255,255,255,0.98); padding: 0.8rem; border-radius: 10px; box-shadow: var(--shadow); display: none; flex-direction: column; min-width: 160px; }
.nav-links.show { display: flex; }
.nav-links a { padding: 0.6rem 0.8rem; }
n .hero-wrap { grid-template-columns: 1fr; text-align: center; }
.hero-img { order: 2; }
.hero-text { order: 1; }
.hero-text h1 { font-size: 2rem; }
.feature-cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
.navbar { top: 10px; }
.hero { margin-top: 80px; padding: 2rem 0; }
.hero-text h1 { font-size: 1.6rem; }
.btn { padding: 0.6rem 1rem; }
.step-item { flex-direction: column; gap: 0.6rem; }
}
/* 无动画偏好支持:当用户选择减少动画时,禁用大量 CSS 动画和过渡 */
@media (prefers-reduced-motion: reduce) {
:root {
/* 可根据需要微调体验 */
}
* {
animation: none !important;
transition: none !important;
scroll-behavior: auto !important;
}
.nav-links.show {
animation: none !important;
}
.feature-card.in-view, .hero-img.in-view, .fade-up.in-view {
opacity: 1 !important;
transform: none !important;
}
/* 按钮波纹与伪元素隐藏/取消 */
.btn .ripple { display: none !important; }
/* 禁用导航切换旋转动画 */
.nav-toggle.open i { transform: none !important; transition: none !important; }
/* 减少阴影/浮动效果为静态样式 */
.feature-card:hover, .feature-card:focus-within { transform: none !important; box-shadow: 0 8px 18px rgba(8,15,30,0.06) !important; }
.btn:hover { transform: none !important; }
}