243 lines
5.4 KiB
CSS
Executable File
243 lines
5.4 KiB
CSS
Executable File
/* 背景样式文件 - 独立管理背景相关样式 */
|
|
|
|
/* 主体背景 */
|
|
body {
|
|
background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 25%, #e1f5e1 50%, #f5f9f5 75%, #e8f5e8 100%);
|
|
background-size: 400% 400%;
|
|
animation: gradientShift 15s ease infinite;
|
|
position: relative;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* 背景动画 */
|
|
@keyframes gradientShift {
|
|
0% {
|
|
background-position: 0% 50%;
|
|
}
|
|
50% {
|
|
background-position: 100% 50%;
|
|
}
|
|
100% {
|
|
background-position: 0% 50%;
|
|
}
|
|
}
|
|
|
|
/* 装饰性背景元素 */
|
|
body::before {
|
|
content: '';
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-image:
|
|
radial-gradient(circle at 20% 80%, rgba(144, 238, 144, 0.1) 0%, transparent 50%),
|
|
radial-gradient(circle at 80% 20%, rgba(152, 251, 152, 0.1) 0%, transparent 50%),
|
|
radial-gradient(circle at 40% 40%, rgba(173, 255, 173, 0.08) 0%, transparent 50%);
|
|
pointer-events: none;
|
|
z-index: -2;
|
|
}
|
|
|
|
/* 浮动装饰圆点 */
|
|
body::after {
|
|
content: '';
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-image:
|
|
radial-gradient(2px 2px at 20px 30px, rgba(76, 175, 80, 0.3), transparent),
|
|
radial-gradient(2px 2px at 40px 70px, rgba(129, 199, 132, 0.3), transparent),
|
|
radial-gradient(1px 1px at 90px 40px, rgba(165, 214, 167, 0.3), transparent),
|
|
radial-gradient(1px 1px at 130px 80px, rgba(200, 230, 201, 0.3), transparent),
|
|
radial-gradient(2px 2px at 160px 30px, rgba(76, 175, 80, 0.2), transparent);
|
|
background-repeat: repeat;
|
|
background-size: 200px 100px;
|
|
animation: floatDots 20s linear infinite;
|
|
pointer-events: none;
|
|
z-index: -1;
|
|
}
|
|
|
|
@keyframes floatDots {
|
|
0% {
|
|
transform: translateY(0px);
|
|
}
|
|
100% {
|
|
transform: translateY(-100px);
|
|
}
|
|
}
|
|
|
|
/* 容器背景增强 */
|
|
.container {
|
|
background: rgba(255, 255, 255, 0.02);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: 20px;
|
|
position: relative;
|
|
}
|
|
|
|
/* 表单区域背景 */
|
|
.form-section {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(20px);
|
|
border: 1px solid rgba(144, 238, 144, 0.3);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.form-section::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: -50%;
|
|
left: -50%;
|
|
width: 200%;
|
|
height: 200%;
|
|
background: linear-gradient(45deg, transparent, rgba(144, 238, 144, 0.05), transparent);
|
|
animation: shimmer 3s ease-in-out infinite;
|
|
pointer-events: none;
|
|
}
|
|
|
|
@keyframes shimmer {
|
|
0% {
|
|
transform: translateX(-100%) translateY(-100%) rotate(45deg);
|
|
}
|
|
50% {
|
|
transform: translateX(100%) translateY(100%) rotate(45deg);
|
|
}
|
|
100% {
|
|
transform: translateX(-100%) translateY(-100%) rotate(45deg);
|
|
}
|
|
}
|
|
|
|
/* 结果卡片背景 */
|
|
.basic-info-card,
|
|
.bmi-card,
|
|
.weight-card,
|
|
.metabolism-card,
|
|
.body-fat-card,
|
|
.measurements-card,
|
|
.advice-card {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(15px);
|
|
border: 1px solid rgba(144, 238, 144, 0.2);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 卡片悬停背景效果 */
|
|
.basic-info-card:hover,
|
|
.bmi-card:hover,
|
|
.weight-card:hover,
|
|
.metabolism-card:hover,
|
|
.body-fat-card:hover,
|
|
.measurements-card:hover,
|
|
.advice-card:hover {
|
|
background: rgba(255, 255, 255, 0.98);
|
|
border-color: rgba(76, 175, 80, 0.4);
|
|
}
|
|
|
|
/* 免责声明卡片背景 */
|
|
.disclaimer-card {
|
|
background: rgba(255, 243, 205, 0.95);
|
|
backdrop-filter: blur(15px);
|
|
border: 1px solid rgba(255, 234, 167, 0.5);
|
|
}
|
|
|
|
/* 错误区域背景 */
|
|
.error-content {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(20px);
|
|
border: 1px solid rgba(220, 53, 69, 0.2);
|
|
}
|
|
|
|
/* 输入框背景 */
|
|
.form-input,
|
|
.form-select {
|
|
background: rgba(248, 255, 248, 0.9);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.form-input:focus,
|
|
.form-select:focus {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(15px);
|
|
}
|
|
|
|
/* 信息项背景 */
|
|
.info-item {
|
|
background: rgba(248, 255, 248, 0.8);
|
|
backdrop-filter: blur(5px);
|
|
}
|
|
|
|
/* BMI分类背景 */
|
|
.bmi-category {
|
|
background: rgba(232, 245, 232, 0.9);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
/* 健康建议列表项背景 */
|
|
.health-tips li {
|
|
background: rgba(248, 255, 248, 0.8);
|
|
backdrop-filter: blur(5px);
|
|
}
|
|
|
|
/* 按钮背景增强 */
|
|
.submit-btn {
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.submit-btn::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: -100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
|
transition: left 0.5s;
|
|
}
|
|
|
|
.submit-btn:hover::before {
|
|
left: 100%;
|
|
}
|
|
|
|
/* 重置按钮背景 */
|
|
.reset-btn {
|
|
background: rgba(232, 245, 232, 0.9);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.reset-btn:hover {
|
|
background: rgba(212, 237, 218, 0.95);
|
|
}
|
|
|
|
/* 响应式背景调整 */
|
|
@media (max-width: 767px) {
|
|
body::after {
|
|
background-size: 150px 75px;
|
|
animation-duration: 15s;
|
|
}
|
|
|
|
.form-section::before {
|
|
animation-duration: 2s;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 768px) and (max-width: 1024px) {
|
|
body::after {
|
|
background-size: 180px 90px;
|
|
animation-duration: 18s;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
body::after {
|
|
background-size: 220px 110px;
|
|
animation-duration: 25s;
|
|
}
|
|
|
|
.container {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
}
|
|
} |