上传文件至「static/css」

This commit is contained in:
admin committed 2026-04-28 10:46:55 +00:00
1 parent c636cc60d9
commit df0daabcf6
1 file changed
+159
+159
View File
@@ -0,0 +1,159 @@
:root {
--text-color: #ffffff;
--accent-color: #00d2ff;
--glass-border: rgba(255, 255, 255, 0.2);
--btn-bg: rgba(255, 255, 255, 0.1);
}
body, html {
margin: 0; padding: 0; min-height: 100%;
font-family: 'Inter', 'PingFang SC', sans-serif;
background: #0a0a0b; overflow-x: hidden; color: var(--text-color);
}
/* 导航栏 */
.glass-nav {
position: fixed; top: 0; width: 100%; z-index: 1000;
display: flex; justify-content: space-between; align-items: center;
padding: 1rem 2rem; box-sizing: border-box;
background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(20px);
border-bottom: 1px solid var(--glass-border);
}
.nav-btn {
color: white; text-decoration: none; margin-left: 10px;
font-size: 0.85rem; font-weight: 600; padding: 8px 18px; border-radius: 50px;
background: var(--btn-bg); border: 1px solid var(--glass-border);
transition: all 0.3s ease; display: inline-block;
}
.nav-btn:hover {
background: rgba(255, 255, 255, 0.2); border-color: var(--accent-color);
transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 210, 255, 0.2);
}
/* Hero 区域:自适应垂直居中布局 */
.hero-section {
position: relative;
width: 100%;
height: 100vh; /* 撑满屏幕高度 */
display: flex;
flex-direction: column;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
padding: 0 20px;
box-sizing: border-box;
overflow: hidden;
}
.hero-content-pure {
text-align: center;
z-index: 1;
width: 100%;
max-width: 800px;
/* 核心修改:向上平移 12%,实现“居中偏上”,为底部留出视觉空间 */
transform: translateY(-12%);
will-change: transform, opacity;
}
.hero-content-pure h1 {
font-size: clamp(2rem, 8vw, 3.5rem); /* 自适应字体大小 */
font-weight: 800;
margin: 0 auto 1.5rem;
line-height: 1.2;
white-space: normal;
word-wrap: break-word;
}
.hero-content-pure p {
font-size: clamp(0.9rem, 4vw, 1.2rem);
opacity: 0.8;
margin: 0 auto 2.5rem;
max-width: 600px;
line-height: 1.6;
white-space: normal;
word-wrap: break-word;
}
/* 按钮容器确保按钮在 text-align 下居中 */
.btn-container {
display: flex;
justify-content: center;
width: 100%;
}
.btn-visit {
background: var(--accent-color);
color: white;
text-decoration: none;
padding: 14px 40px;
border-radius: 100px;
font-weight: 700;
transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
display: inline-block;
box-shadow: 0 10px 20px rgba(0, 210, 255, 0.3);
}
/* 动画状态控制 */
.hero-content-pure h1,
.hero-content-pure p,
.hero-content-pure .btn-container {
transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
opacity: 0;
transform: translateY(30px);
}
.hero-content-pure.active h1,
.hero-content-pure.active p,
.hero-content-pure.active .btn-container {
opacity: 1;
transform: translateY(0);
}
/* 背景图 */
.hero-bg {
position: absolute; inset: 0;
background-size: cover; background-position: center;
transition: opacity 1s ease; filter: brightness(0.35); z-index: -1;
}
/* 底部 Swiper 修复 */
.bottom-nav-container {
position: absolute; bottom: 30px; width: 100%; height: 180px; z-index: 10;
}
.swiper {
width: 95%; height: 100%; padding: 25px 0 !important; overflow: visible !important;
}
.nav-card {
background: rgba(255,255,255,0.05); border-radius: 16px; overflow: hidden;
cursor: pointer; transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
border: 2px solid transparent; height: 120px !important;
}
.nav-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grayscale { filter: grayscale(100%); opacity: 0.5; }
.swiper-slide-active.nav-card {
border-color: var(--accent-color);
animation: pulse 2.5s infinite ease-in-out;
filter: none; opacity: 1;
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.1); }
}
.card-info {
position: absolute; bottom: 0; width: 100%; padding: 8px;
background: linear-gradient(transparent, rgba(0,0,0,0.85)); text-align: center;
}
.card-info h3 { margin: 0; font-size: 12px; }
@media (max-width: 767px) {
.hero-section { padding-top: 60px; }
.hero-content-pure { transform: translateY(-15%); } /* 移动端再往上提一点 */
}