Files
InfoGenie/frontend/60sapi/热搜榜单/网易云榜单/css/background.css
yangyaoxiang666 bd4c7439be 热搜榜单
热搜榜单
2025-09-06 09:54:49 +08:00

128 lines
2.9 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);
}
}
/* 音符装饰 */
.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 (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, #2b2b2b 0%, #1e1e1e 50%, #2b2b2b 100%);
}
body::after {
animation: none;
}
.music-note {
animation: none;
display: none;
}
}