177 lines
4.2 KiB
CSS
177 lines
4.2 KiB
CSS
/* === 核心变量与重置 === */
|
|
:root {
|
|
--primary-color: #1E88E5; /* 主色调:银河蓝 */
|
|
--secondary-color: #42A5F5; /* 辅色 */
|
|
--text-dark: #2c3e50; /* 深色文字 */
|
|
--text-light: #7f8c8d; /* 浅色文字(名言) */
|
|
--bg-white: #ffffff; /* 纯白背景 */
|
|
--shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05); /* 柔和阴影 */
|
|
--shadow-hover: 0 15px 35px rgba(30, 136, 229, 0.15); /* 悬停阴影 */
|
|
}
|
|
|
|
|
|
.welcome-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-height: 70vh; /* 占据视口高度的70% */
|
|
padding: 20px;
|
|
text-align: center;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
/* === Logo 区域 === */
|
|
.logo-container {
|
|
width: 140px;
|
|
height: 140px;
|
|
margin-bottom: 30px;
|
|
position: relative;
|
|
animation: float 6s ease-in-out infinite;
|
|
}
|
|
|
|
.logo-g {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
filter: drop-shadow(0 10px 15px rgba(30, 136, 229, 0.2));
|
|
}
|
|
|
|
/* === 标题区域 (极光文字效果) === */
|
|
.welcome-title {
|
|
font-size: 36px;
|
|
font-weight: 700;
|
|
color: var(--text-dark);
|
|
margin-bottom: 10px;
|
|
letter-spacing: 1px;
|
|
|
|
/* 背景裁切实现文字渐变 */
|
|
background: linear-gradient(135deg, #2c3e50 0%, var(--primary-color) 100%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
/* === 每日名言区域 === */
|
|
.daily-quote {
|
|
min-height: 60px; /* 防止高度坍塌 */
|
|
margin: 25px 0 50px 0;
|
|
max-width: 600px;
|
|
padding: 0 20px;
|
|
}
|
|
|
|
.quote-content {
|
|
font-size: 16px;
|
|
color: var(--text-light);
|
|
font-style: italic;
|
|
line-height: 1.6;
|
|
transition: opacity 0.5s ease, transform 0.5s ease;
|
|
}
|
|
|
|
.quote-author {
|
|
display: block;
|
|
margin-top: 10px;
|
|
font-size: 13px;
|
|
color: #bdc3c7;
|
|
font-weight: 500;
|
|
transition: opacity 0.5s ease 0.1s; /* 稍微延迟 */
|
|
}
|
|
|
|
/* 名言切换动画状态 */
|
|
.quote-fade-out {
|
|
opacity: 0;
|
|
transform: translateY(5px);
|
|
}
|
|
.quote-fade-in {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* === 按钮区域 === */
|
|
.action-buttons {
|
|
display: flex;
|
|
gap: 25px;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
width: 100%;
|
|
max-width: 900px;
|
|
}
|
|
|
|
.action-btn {
|
|
min-width: 160px;
|
|
height: 54px;
|
|
padding: 0 30px;
|
|
background: var(--bg-white);
|
|
border: 1px solid rgba(0,0,0,0.05); /* 极淡的边框 */
|
|
border-radius: 12px;
|
|
color: var(--text-dark);
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
cursor: pointer;
|
|
box-shadow: var(--shadow-soft);
|
|
transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 按钮图标样式 */
|
|
.action-btn i {
|
|
font-size: 18px;
|
|
color: var(--primary-color);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
/* 按钮交互:悬停 */
|
|
.action-btn:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: var(--shadow-hover);
|
|
border-color: rgba(30, 136, 229, 0.1);
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.action-btn:hover i {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
/* 按钮交互:点击 */
|
|
.action-btn:active {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(0,0,0,0.05);
|
|
}
|
|
|
|
/* === 动画关键帧 === */
|
|
@keyframes float {
|
|
0%, 100% { transform: translateY(0); }
|
|
50% { transform: translateY(-15px); }
|
|
}
|
|
|
|
/* === 响应式适配 === */
|
|
@media (max-width: 768px) {
|
|
.welcome-container {
|
|
padding: 10px;
|
|
}
|
|
.logo-container {
|
|
width: 100px;
|
|
height: 100px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.welcome-title {
|
|
font-size: 26px;
|
|
}
|
|
.action-buttons {
|
|
flex-direction: column; /* 手机端改为垂直排列 */
|
|
gap: 15px;
|
|
align-items: center;
|
|
}
|
|
.action-btn {
|
|
width: 100%;
|
|
max-width: 300px; /* 限制最大宽度 */
|
|
}
|
|
} |