Files
InfoGenie/frontend/60sapi/热搜榜单/网易云榜单详情/css/background.css
yangyaoxiang666 6829a16f96 热门推荐
热门推荐
2025-09-04 14:07:42 +08:00

155 lines
4.0 KiB
CSS

/* 网易云音乐特色背景样式 */
body {
background: linear-gradient(135deg, #2b2b2b 0%, #1e1e1e 50%, #2b2b2b 100%);
background-size: 400% 400%;
animation: gradientShift 15s ease infinite;
position: relative;
color: #fff;
}
/* 背景渐变动画 */
@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(236, 65, 65, 0.15) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba(236, 65, 65, 0.1) 0%, transparent 50%),
radial-gradient(circle at 40% 40%, rgba(236, 65, 65, 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(236, 65, 65, 0.4), transparent),
radial-gradient(2px 2px at 40px 70px, rgba(236, 65, 65, 0.3), transparent),
radial-gradient(1px 1px at 90px 40px, rgba(236, 65, 65, 0.4), transparent),
radial-gradient(1px 1px at 130px 80px, rgba(236, 65, 65, 0.3), transparent),
radial-gradient(2px 2px at 160px 30px, rgba(236, 65, 65, 0.4), 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;
}
}
/* 音符装饰 */
.music-note {
position: absolute;
font-size: 24px;
color: rgba(236, 65, 65, 0.3);
animation: floatNote 15s linear infinite;
z-index: -1;
}
@keyframes floatNote {
0% {
transform: translateY(0) rotate(0deg);
opacity: 0;
}
10% {
opacity: 0.8;
}
90% {
opacity: 0.8;
}
100% {
transform: translateY(-100vh) rotate(360deg);
opacity: 0;
}
}
/* 高性能模式 - 减少动画 */
@media (prefers-reduced-motion: reduce) {
body {
animation: none;
background: linear-gradient(135deg, #2b2b2b 0%, #1e1e1e 50%, #2b2b2b 100%);
}
body::after {
animation: none;
}
.music-note {
animation: none;
display: 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;
}
}