123 lines
3.4 KiB
CSS
123 lines
3.4 KiB
CSS
/* 背景样式文件 */
|
|
body {
|
|
background: linear-gradient(135deg, #E8F5E8 0%, #F1F8E9 25%, #E0F2F1 50%, #E8F5E8 75%, #F3E5F5 100%);
|
|
background-size: 400% 400%;
|
|
animation: gradientShift 15s ease infinite;
|
|
position: relative;
|
|
}
|
|
|
|
/* 背景渐变动画 */
|
|
@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(76, 175, 80, 0.1) 0%, transparent 50%),
|
|
radial-gradient(circle at 80% 20%, rgba(129, 199, 132, 0.1) 0%, transparent 50%),
|
|
radial-gradient(circle at 40% 40%, rgba(165, 214, 167, 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.2), transparent),
|
|
radial-gradient(1px 1px at 90px 40px, rgba(165, 214, 167, 0.3), transparent),
|
|
radial-gradient(1px 1px at 130px 80px, rgba(76, 175, 80, 0.2), transparent),
|
|
radial-gradient(2px 2px at 160px 30px, rgba(129, 199, 132, 0.3), transparent);
|
|
background-repeat: repeat;
|
|
background-size: 200px 100px;
|
|
animation: particleFloat 20s linear infinite;
|
|
pointer-events: none;
|
|
z-index: -1;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
@keyframes particleFloat {
|
|
0% {
|
|
transform: translateY(0px);
|
|
}
|
|
100% {
|
|
transform: translateY(-100px);
|
|
}
|
|
}
|
|
|
|
/* 响应式背景调整 */
|
|
@media (max-width: 768px) {
|
|
body::after {
|
|
background-size: 150px 75px;
|
|
animation-duration: 25s;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
body::after {
|
|
background-size: 100px 50px;
|
|
animation-duration: 30s;
|
|
opacity: 0.4;
|
|
}
|
|
}
|
|
|
|
/* 高性能模式 - 减少动画 */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
body {
|
|
animation: none;
|
|
background: linear-gradient(135deg, #E8F5E8 0%, #F1F8E9 50%, #E0F2F1 100%);
|
|
}
|
|
|
|
body::after {
|
|
animation: none;
|
|
}
|
|
|
|
.title {
|
|
animation: none;
|
|
}
|
|
}
|
|
|
|
/* 深色模式支持 */
|
|
@media (prefers-color-scheme: dark) {
|
|
body {
|
|
background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 25%, #388E3C 50%, #43A047 75%, #4CAF50 100%);
|
|
}
|
|
|
|
body::before {
|
|
background-image:
|
|
radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
|
|
radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
|
|
radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
|
|
}
|
|
|
|
body::after {
|
|
background-image:
|
|
radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.1), transparent),
|
|
radial-gradient(1px 1px at 40px 70px, rgba(255, 255, 255, 0.08), transparent),
|
|
radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.06), transparent),
|
|
radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.04), transparent),
|
|
radial-gradient(1px 1px at 160px 30px, rgba(255, 255, 255, 0.05), transparent);
|
|
opacity: 0.3;
|
|
}
|
|
} |