热门推荐
热门推荐
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -6,9 +6,100 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background-color: #f0f7ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.green-gradient {
|
/* 太阳元素 */
|
||||||
|
.sun {
|
||||||
|
position: absolute;
|
||||||
|
top: 50px;
|
||||||
|
right: 35%;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
background: radial-gradient(circle, #ffeb3b 30%, #ff9800 70%);
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 40px rgba(255, 152, 0, 0.6);
|
||||||
|
z-index: 0;
|
||||||
|
animation: sun-pulse 8s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 蓝色云元素 */
|
||||||
|
.cloud {
|
||||||
|
position: absolute;
|
||||||
|
background: rgba(135, 206, 250, 0.8);
|
||||||
|
border-radius: 50px;
|
||||||
|
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cloud-1 {
|
||||||
|
top: 120px;
|
||||||
|
left: -150px;
|
||||||
|
width: 120px;
|
||||||
|
height: 40px;
|
||||||
|
animation: cloud-float 15s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cloud-2 {
|
||||||
|
top: 180px;
|
||||||
|
right: -150px;
|
||||||
|
width: 160px;
|
||||||
|
height: 50px;
|
||||||
|
animation: cloud-float 20s linear infinite reverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cloud-3 {
|
||||||
|
top: 60px;
|
||||||
|
left: -100px;
|
||||||
|
width: 100px;
|
||||||
|
height: 35px;
|
||||||
|
animation: cloud-float 12s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 云朵的伪元素,创建更自然的形状 */
|
||||||
|
.cloud::before,
|
||||||
|
.cloud::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
background: rgba(135, 206, 250, 0.8);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cloud::before {
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
top: -20px;
|
||||||
|
left: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cloud::after {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
top: -30px;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes sun-pulse {
|
||||||
|
0%, 100% {
|
||||||
|
transform: scale(1);
|
||||||
|
box-shadow: 0 0 40px rgba(255, 152, 0, 0.6);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.1);
|
||||||
|
box-shadow: 0 0 60px rgba(255, 152, 0, 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes cloud-float {
|
||||||
|
0% {
|
||||||
|
transform: translateX(-150px);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateX(calc(100vw + 150px));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -50%;
|
top: -50%;
|
||||||
left: -50%;
|
left: -50%;
|
||||||
@@ -16,16 +107,19 @@
|
|||||||
height: 200%;
|
height: 200%;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
135deg,
|
135deg,
|
||||||
rgba(76, 175, 80, 0.3) 0%,
|
rgba(24, 144, 255, 0.6) 0%,
|
||||||
rgba(129, 199, 132, 0.2) 25%,
|
rgba(64, 169, 255, 0.5) 20%,
|
||||||
rgba(165, 214, 167, 0.1) 50%,
|
rgba(135, 208, 255, 0.4) 40%,
|
||||||
rgba(200, 230, 201, 0.2) 75%,
|
rgba(255, 175, 64, 0.4) 60%,
|
||||||
rgba(76, 175, 80, 0.3) 100%
|
rgba(255, 122, 69, 0.5) 80%,
|
||||||
|
rgba(245, 85, 65, 0.6) 100%
|
||||||
);
|
);
|
||||||
animation: green-flow 20s ease-in-out infinite;
|
animation: gradient-flow 25s ease-in-out infinite;
|
||||||
|
border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
|
||||||
|
filter: blur(30px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.green-gradient::before {
|
.modern-gradient::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -33,18 +127,20 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: radial-gradient(
|
background: radial-gradient(
|
||||||
circle at 30% 70%,
|
circle at 25% 65%,
|
||||||
rgba(139, 195, 74, 0.4) 0%,
|
rgba(24, 144, 255, 0.6) 0%,
|
||||||
transparent 50%
|
transparent 60%
|
||||||
), radial-gradient(
|
), radial-gradient(
|
||||||
circle at 70% 30%,
|
circle at 75% 35%,
|
||||||
rgba(102, 187, 106, 0.3) 0%,
|
rgba(245, 85, 65, 0.5) 0%,
|
||||||
transparent 50%
|
transparent 60%
|
||||||
);
|
);
|
||||||
animation: green-pulse 15s ease-in-out infinite alternate;
|
animation: pulse-effect 18s ease-in-out infinite alternate;
|
||||||
|
border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
|
||||||
|
filter: blur(20px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes green-flow {
|
@keyframes gradient-flow {
|
||||||
0%, 100% {
|
0%, 100% {
|
||||||
transform: rotate(0deg) scale(1);
|
transform: rotate(0deg) scale(1);
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
@@ -63,7 +159,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes green-pulse {
|
@keyframes pulse-effect {
|
||||||
0% {
|
0% {
|
||||||
transform: scale(1) rotate(0deg);
|
transform: scale(1) rotate(0deg);
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
@@ -80,28 +176,28 @@
|
|||||||
|
|
||||||
/* 手机端背景优化 */
|
/* 手机端背景优化 */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.green-gradient {
|
.modern-gradient {
|
||||||
animation-duration: 25s;
|
animation-duration: 25s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.green-gradient::before {
|
.modern-gradient::before {
|
||||||
animation-duration: 18s;
|
animation-duration: 18s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 减少动画以节省电池 */
|
/* 减少动画以节省电池 */
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.green-gradient,
|
.modern-gradient,
|
||||||
.green-gradient::before {
|
.modern-gradient::before {
|
||||||
animation: none;
|
animation: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.green-gradient {
|
.modern-gradient {
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
135deg,
|
135deg,
|
||||||
rgba(76, 175, 80, 0.2) 0%,
|
rgba(64, 169, 255, 0.3) 0%,
|
||||||
rgba(165, 214, 167, 0.1) 50%,
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
rgba(200, 230, 201, 0.15) 100%
|
rgba(255, 122, 69, 0.25) 100%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,88 @@
|
|||||||
|
/* 背景样式 */
|
||||||
|
.background-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
|
position: absolute;
|
||||||
|
top: -50%;
|
||||||
|
left: -50%;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.4) 0%,
|
||||||
|
rgba(120, 192, 255, 0.3) 25%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 140, 50, 0.3) 75%,
|
||||||
|
rgba(255, 122, 69, 0.4) 100%
|
||||||
|
);
|
||||||
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient(
|
||||||
|
circle at 30% 70%,
|
||||||
|
rgba(64, 169, 255, 0.5) 0%,
|
||||||
|
transparent 50%
|
||||||
|
), radial-gradient(
|
||||||
|
circle at 70% 30%,
|
||||||
|
rgba(255, 140, 50, 0.4) 0%,
|
||||||
|
transparent 50%
|
||||||
|
);
|
||||||
|
animation: pulse-effect 15s ease-in-out infinite alternate;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes gradient-flow {
|
||||||
|
0%, 100% {
|
||||||
|
transform: rotate(0deg) scale(1);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: rotate(90deg) scale(1.1);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: rotate(180deg) scale(0.9);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: rotate(270deg) scale(1.05);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-effect {
|
||||||
|
0% {
|
||||||
|
transform: scale(1) rotate(0deg);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2) rotate(180deg);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1) rotate(360deg);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主样式 */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -7,44 +92,52 @@
|
|||||||
body {
|
body {
|
||||||
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||||
color: #333;
|
color: #333;
|
||||||
background-color: #f0f8f0;
|
background-color: #f0f7ff;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 20px auto;
|
||||||
padding: 20px;
|
padding: 28px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: rgba(255, 255, 255, 0.9);
|
background-color: rgba(255, 255, 255, 0.8);
|
||||||
border-radius: 12px;
|
border-radius: 24px;
|
||||||
box-shadow: 0 4px 16px rgba(0, 128, 0, 0.1);
|
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
|
||||||
|
backdrop-filter: blur(15px);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 32px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 24px;
|
||||||
border-bottom: 2px solid #e8f5e8;
|
border-bottom: 1px solid rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
color: #2d8f47;
|
background: linear-gradient(135deg, #1890ff, #ff7a45);
|
||||||
margin-bottom: 12px;
|
-webkit-background-clip: text;
|
||||||
font-size: 2.2rem;
|
background-clip: text;
|
||||||
font-weight: 600;
|
color: transparent;
|
||||||
text-shadow: 0 2px 4px rgba(45, 143, 71, 0.1);
|
margin-bottom: 16px;
|
||||||
|
font-size: 2.6rem;
|
||||||
|
font-weight: 800;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
|
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.update-time {
|
.update-time {
|
||||||
color: #6b8e6b;
|
color: #666;
|
||||||
font-size: 0.95rem;
|
font-size: 0.9rem;
|
||||||
background-color: #f0f8f0;
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
padding: 8px 16px;
|
padding: 10px 20px;
|
||||||
border-radius: 20px;
|
border-radius: 30px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-list {
|
.hot-list {
|
||||||
@@ -52,51 +145,51 @@ header h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 18px;
|
padding: 22px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 20px;
|
||||||
border-radius: 10px;
|
border-radius: 16px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
box-shadow: 0 3px 8px rgba(0, 128, 0, 0.08);
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-left: 4px solid transparent;
|
border: 1px solid rgba(255, 255, 255, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-item:hover {
|
.hot-item:hover {
|
||||||
transform: translateY(-3px);
|
transform: translateY(-3px);
|
||||||
box-shadow: 0 6px 16px rgba(0, 128, 0, 0.15);
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||||
border-left-color: #4caf50;
|
border-color: rgba(64, 169, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank {
|
.hot-rank {
|
||||||
font-size: 1.3rem;
|
font-size: 1.2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #4caf50;
|
color: #4096ff;
|
||||||
margin-right: 18px;
|
margin-right: 18px;
|
||||||
min-width: 35px;
|
min-width: 38px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #f0f8f0;
|
background-color: rgba(64, 169, 255, 0.1);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 35px;
|
width: 38px;
|
||||||
height: 35px;
|
height: 38px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank.top-1 {
|
.hot-rank.top-1 {
|
||||||
background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
|
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank.top-2 {
|
.hot-rank.top-2 {
|
||||||
background: linear-gradient(135deg, #ffa726, #ffb74d);
|
background: linear-gradient(135deg, #ff7a45, #ffa940);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank.top-3 {
|
.hot-rank.top-3 {
|
||||||
background: linear-gradient(135deg, #ffca28, #ffd54f);
|
background: linear-gradient(135deg, #ffa940, #ffec3d);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,23 +199,24 @@ header h1 {
|
|||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
font-size: 1.15rem;
|
font-size: 1.15rem;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 8px;
|
||||||
color: #2c3e2c;
|
color: #333;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.4;
|
line-height: 1.5;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
transition: color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title:hover {
|
.hot-title:hover {
|
||||||
color: #2d8f47;
|
color: #4096ff;
|
||||||
text-decoration: underline;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
color: #6b8e6b;
|
color: #666;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,24 +224,24 @@ footer {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
border-top: 1px solid #e8f5e8;
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
color: #6b8e6b;
|
color: #666;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 平板端适配 (768px - 1024px) */
|
/* 响应式设计 */
|
||||||
@media (max-width: 1024px) and (min-width: 768px) {
|
@media (max-width: 1024px) and (min-width: 768px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
padding: 18px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
font-size: 2rem;
|
font-size: 2.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 16px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
@@ -155,22 +249,21 @@ footer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 手机端适配 (最大768px) */
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
body {
|
body {
|
||||||
background-color: #f8fdf8;
|
background-color: #f8f9fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
margin: 10px auto;
|
margin: 12px auto;
|
||||||
padding: 15px;
|
padding: 16px;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
@@ -184,40 +277,39 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 14px;
|
padding: 16px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 12px;
|
||||||
border-radius: 8px;
|
border-radius: 10px;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank {
|
.hot-rank {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
margin-right: 12px;
|
margin-right: 14px;
|
||||||
min-width: 30px;
|
min-width: 32px;
|
||||||
width: 30px;
|
width: 32px;
|
||||||
height: 30px;
|
height: 32px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
margin-top: 20px;
|
margin-top: 24px;
|
||||||
padding-top: 15px;
|
padding-top: 16px;
|
||||||
font-size: 0.8rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 小屏手机适配 (最大480px) */
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.container {
|
.container {
|
||||||
margin: 5px auto;
|
margin: 8px auto;
|
||||||
padding: 12px;
|
padding: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
@@ -225,24 +317,36 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 12px;
|
padding: 14px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank {
|
.hot-rank {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
margin-right: 10px;
|
margin-right: 12px;
|
||||||
min-width: 28px;
|
min-width: 30px;
|
||||||
width: 28px;
|
width: 30px;
|
||||||
height: 28px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 减少动画以节省电池 */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.modern-gradient,
|
||||||
|
.modern-gradient::before {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
.update-time {
|
.modern-gradient {
|
||||||
font-size: 0.8rem;
|
background: linear-gradient(
|
||||||
padding: 5px 10px;
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.3) 0%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 122, 69, 0.25) 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="background-container">
|
<div class="background-container">
|
||||||
<div class="green-gradient"></div>
|
<div class="modern-gradient"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|||||||
@@ -16,11 +16,11 @@
|
|||||||
height: 200%;
|
height: 200%;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
135deg,
|
135deg,
|
||||||
rgba(76, 175, 80, 0.3) 0%,
|
rgba(240, 20, 20, 0.3) 0%,
|
||||||
rgba(129, 199, 132, 0.2) 25%,
|
rgba(255, 60, 60, 0.2) 25%,
|
||||||
rgba(165, 214, 167, 0.1) 50%,
|
rgba(255, 100, 100, 0.1) 50%,
|
||||||
rgba(200, 230, 201, 0.2) 75%,
|
rgba(255, 150, 150, 0.2) 75%,
|
||||||
rgba(76, 175, 80, 0.3) 100%
|
rgba(240, 20, 20, 0.3) 100%
|
||||||
);
|
);
|
||||||
animation: green-flow 20s ease-in-out infinite;
|
animation: green-flow 20s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
@@ -34,11 +34,11 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
background: radial-gradient(
|
background: radial-gradient(
|
||||||
circle at 30% 70%,
|
circle at 30% 70%,
|
||||||
rgba(139, 195, 74, 0.4) 0%,
|
rgba(255, 45, 45, 0.4) 0%,
|
||||||
transparent 50%
|
transparent 50%
|
||||||
), radial-gradient(
|
), radial-gradient(
|
||||||
circle at 70% 30%,
|
circle at 70% 30%,
|
||||||
rgba(102, 187, 106, 0.3) 0%,
|
rgba(255, 100, 100, 0.3) 0%,
|
||||||
transparent 50%
|
transparent 50%
|
||||||
);
|
);
|
||||||
animation: green-pulse 15s ease-in-out infinite alternate;
|
animation: green-pulse 15s ease-in-out infinite alternate;
|
||||||
|
|||||||
@@ -1,3 +1,88 @@
|
|||||||
|
/* 背景样式 */
|
||||||
|
.background-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
|
position: absolute;
|
||||||
|
top: -50%;
|
||||||
|
left: -50%;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.4) 0%,
|
||||||
|
rgba(120, 192, 255, 0.3) 25%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 140, 50, 0.3) 75%,
|
||||||
|
rgba(255, 122, 69, 0.4) 100%
|
||||||
|
);
|
||||||
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient(
|
||||||
|
circle at 30% 70%,
|
||||||
|
rgba(64, 169, 255, 0.5) 0%,
|
||||||
|
transparent 50%
|
||||||
|
), radial-gradient(
|
||||||
|
circle at 70% 30%,
|
||||||
|
rgba(255, 140, 50, 0.4) 0%,
|
||||||
|
transparent 50%
|
||||||
|
);
|
||||||
|
animation: pulse-effect 15s ease-in-out infinite alternate;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes gradient-flow {
|
||||||
|
0%, 100% {
|
||||||
|
transform: rotate(0deg) scale(1);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: rotate(90deg) scale(1.1);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: rotate(180deg) scale(0.9);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: rotate(270deg) scale(1.05);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-effect {
|
||||||
|
0% {
|
||||||
|
transform: scale(1) rotate(0deg);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2) rotate(180deg);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1) rotate(360deg);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主样式 */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -7,44 +92,188 @@
|
|||||||
body {
|
body {
|
||||||
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||||
color: #333;
|
color: #333;
|
||||||
background-color: #f0f8f0;
|
background-color: #f8f9fa;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 几何装饰样式 */
|
||||||
|
.title-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geometric-decoration {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #f04040;
|
||||||
|
margin: 0 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
letter-spacing: 5px;
|
||||||
|
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
animation: float-effect 3s ease-in-out infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geometric-decoration.left {
|
||||||
|
transform: rotate(-10deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.geometric-decoration.right {
|
||||||
|
transform: rotate(10deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes float-effect {
|
||||||
|
0% {
|
||||||
|
transform: translateY(0) rotate(-10deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateY(-5px) rotate(-8deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-time-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-decoration {
|
||||||
|
color: #f04040;
|
||||||
|
font-size: 18px;
|
||||||
|
margin: 0 10px;
|
||||||
|
animation: pulse 2s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0% {
|
||||||
|
opacity: 0.5;
|
||||||
|
transform: scale(0.8);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 0.5;
|
||||||
|
transform: scale(0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.geometric-header, .geometric-footer {
|
||||||
|
text-align: center;
|
||||||
|
color: #f04040;
|
||||||
|
margin: 15px 0;
|
||||||
|
font-size: 16px;
|
||||||
|
letter-spacing: 3px;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geometric-header {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geometric-footer {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 20px;
|
padding: 24px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: rgba(255, 255, 255, 0.9);
|
background-color: rgba(255, 255, 255, 0.85);
|
||||||
border-radius: 12px;
|
border-radius: 16px;
|
||||||
box-shadow: 0 4px 16px rgba(0, 128, 0, 0.1);
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
border: 2px solid rgba(240, 64, 64, 0.3);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container::before,
|
||||||
|
.container::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
border-color: #f04040;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container::before {
|
||||||
|
top: 10px;
|
||||||
|
left: 10px;
|
||||||
|
border-top: 3px solid;
|
||||||
|
border-left: 3px solid;
|
||||||
|
border-radius: 10px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container::after {
|
||||||
|
bottom: 10px;
|
||||||
|
right: 10px;
|
||||||
|
border-bottom: 3px solid;
|
||||||
|
border-right: 3px solid;
|
||||||
|
border-radius: 0 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 28px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
border-bottom: 2px solid #e8f5e8;
|
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
color: #2d8f47;
|
background: linear-gradient(135deg, #4096ff, #ff7a45);
|
||||||
margin-bottom: 12px;
|
-webkit-background-clip: text;
|
||||||
font-size: 2.2rem;
|
background-clip: text;
|
||||||
font-weight: 600;
|
color: transparent;
|
||||||
text-shadow: 0 2px 4px rgba(45, 143, 71, 0.1);
|
margin-bottom: 14px;
|
||||||
|
font-size: 2.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.update-time {
|
.update-time {
|
||||||
color: #6b8e6b;
|
color: #666;
|
||||||
font-size: 0.95rem;
|
font-size: 0.9rem;
|
||||||
background-color: #f0f8f0;
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
border-radius: 20px;
|
border-radius: 24px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
|
position: relative;
|
||||||
|
border: 1px dashed rgba(240, 64, 64, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-time::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: -5px;
|
||||||
|
left: -5px;
|
||||||
|
right: -5px;
|
||||||
|
bottom: -5px;
|
||||||
|
border: 1px solid rgba(240, 64, 64, 0.3);
|
||||||
|
border-radius: 28px;
|
||||||
|
animation: pulse-border 2s infinite;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-border {
|
||||||
|
0% {
|
||||||
|
transform: scale(1);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.05);
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-list {
|
.hot-list {
|
||||||
@@ -52,139 +281,193 @@ header h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 18px;
|
padding: 20px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 16px;
|
||||||
border-radius: 10px;
|
border-radius: 12px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
box-shadow: 0 3px 8px rgba(0, 128, 0, 0.08);
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-left: 4px solid transparent;
|
border: 1px solid rgba(0, 0, 0, 0.03);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item::before {
|
||||||
|
content: '◆';
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 10px;
|
||||||
|
color: #f04040;
|
||||||
|
opacity: 0.2;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item::after {
|
||||||
|
content: '◆';
|
||||||
|
position: absolute;
|
||||||
|
bottom: 5px;
|
||||||
|
left: 10px;
|
||||||
|
color: #f04040;
|
||||||
|
opacity: 0.2;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.even-item {
|
||||||
|
border-left: 3px solid #f04040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odd-item {
|
||||||
|
border-right: 3px solid #f04040;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-decoration {
|
||||||
|
color: #f04040;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-right: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
transform: translateY(1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-icon, .time-icon {
|
||||||
|
color: #f04040;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 3px;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
position: relative;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-stats {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-item:hover {
|
.hot-item:hover {
|
||||||
transform: translateY(-3px);
|
transform: translateY(-3px);
|
||||||
box-shadow: 0 6px 16px rgba(0, 128, 0, 0.15);
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||||
border-left-color: #4caf50;
|
border-color: rgba(64, 169, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank {
|
.hot-rank {
|
||||||
font-size: 1.3rem;
|
font-size: 1.2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #4caf50;
|
color: #4096ff;
|
||||||
margin-right: 18px;
|
margin-right: 18px;
|
||||||
min-width: 35px;
|
min-width: 38px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #f0f8f0;
|
background-color: rgba(64, 169, 255, 0.1);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 35px;
|
width: 38px;
|
||||||
height: 35px;
|
height: 38px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank.top-1 {
|
.hot-rank.top-1 {
|
||||||
background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
|
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank.top-2 {
|
.hot-rank.top-2 {
|
||||||
background: linear-gradient(135deg, #ffa726, #ffb74d);
|
background: linear-gradient(135deg, #ff7a45, #ffa940);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank.top-3 {
|
.hot-rank.top-3 {
|
||||||
background: linear-gradient(135deg, #ffca28, #ffd54f);
|
background: linear-gradient(135deg, #ffa940, #ffec3d);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-content {
|
.hot-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
font-size: 1.15rem;
|
font-size: 1.15rem;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 8px;
|
||||||
color: #2c3e2c;
|
color: #333;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.4;
|
line-height: 1.5;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
transition: color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title:hover {
|
.hot-title:hover {
|
||||||
color: #2d8f47;
|
color: #4096ff;
|
||||||
text-decoration: underline;
|
text-decoration: none;
|
||||||
}
|
|
||||||
|
|
||||||
.hot-stats {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: #888;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hot-value {
|
|
||||||
background: linear-gradient(135deg, #4caf50, #66bb6a);
|
|
||||||
color: white;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 12px;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hot-tag {
|
|
||||||
background-color: #e8f5e8;
|
|
||||||
color: #2d8f47;
|
|
||||||
padding: 2px 6px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
color: #6b8e6b;
|
color: #666;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30px;
|
margin-top: 40px;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
border-top: 1px solid #e8f5e8;
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
color: #6b8e6b;
|
color: #999;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 平板端适配 (768px - 1024px) */
|
.footer-decoration {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 10px 0;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geo-symbol {
|
||||||
|
color: #f04040;
|
||||||
|
font-size: 16px;
|
||||||
|
opacity: 0.7;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
animation: color-shift 5s infinite alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
.geo-symbol:hover {
|
||||||
|
opacity: 1;
|
||||||
|
transform: scale(1.2) rotate(15deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes color-shift {
|
||||||
|
0% {
|
||||||
|
color: #f04040;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
color: #ff7a45;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
color: #ff4d4f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
@media (max-width: 1024px) and (min-width: 768px) {
|
@media (max-width: 1024px) and (min-width: 768px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
padding: 18px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
font-size: 2rem;
|
font-size: 2.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 16px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
@@ -192,22 +475,21 @@ footer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 手机端适配 (最大768px) */
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
body {
|
body {
|
||||||
background-color: #f8fdf8;
|
background-color: #f8f9fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
margin: 10px auto;
|
margin: 12px auto;
|
||||||
padding: 15px;
|
padding: 16px;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
@@ -221,46 +503,39 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 14px;
|
padding: 16px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 12px;
|
||||||
border-radius: 8px;
|
border-radius: 10px;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank {
|
.hot-rank {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
margin-right: 12px;
|
margin-right: 14px;
|
||||||
min-width: 30px;
|
min-width: 32px;
|
||||||
width: 30px;
|
width: 32px;
|
||||||
height: 30px;
|
height: 32px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 6px;
|
||||||
}
|
|
||||||
|
|
||||||
.hot-stats {
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 10px;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
margin-top: 20px;
|
margin-top: 24px;
|
||||||
padding-top: 15px;
|
padding-top: 16px;
|
||||||
font-size: 0.8rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 小屏手机适配 (最大480px) */
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.container {
|
.container {
|
||||||
margin: 5px auto;
|
margin: 8px auto;
|
||||||
padding: 12px;
|
padding: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
@@ -268,24 +543,36 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 12px;
|
padding: 14px;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank {
|
.hot-rank {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
margin-right: 10px;
|
margin-right: 12px;
|
||||||
min-width: 28px;
|
min-width: 30px;
|
||||||
width: 28px;
|
width: 30px;
|
||||||
height: 28px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 减少动画以节省电池 */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.modern-gradient,
|
||||||
|
.modern-gradient::before {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
.update-time {
|
.modern-gradient {
|
||||||
font-size: 0.8rem;
|
background: linear-gradient(
|
||||||
padding: 5px 10px;
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.3) 0%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 122, 69, 0.25) 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,18 +14,46 @@
|
|||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<h1>头条热搜榜</h1>
|
<div class="title-container">
|
||||||
<div class="update-time" id="updateTime"></div>
|
<div class="geometric-decoration left">◢ ◣ ▲</div>
|
||||||
|
<h1>头条热搜榜</h1>
|
||||||
|
<div class="geometric-decoration right">▼ ◥ ◤</div>
|
||||||
|
</div>
|
||||||
|
<div class="update-time-container">
|
||||||
|
<span class="time-decoration">◇</span>
|
||||||
|
<div class="update-time" id="updateTime"></div>
|
||||||
|
<span class="time-decoration">◇</span>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
<div class="geometric-header">
|
||||||
|
<span>◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆</span>
|
||||||
|
</div>
|
||||||
<div class="hot-list" id="hotList">
|
<div class="hot-list" id="hotList">
|
||||||
<div class="loading">加载中...</div>
|
<div class="loading">加载中...</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="geometric-footer">
|
||||||
|
<span>◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆ ◆</span>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
<div class="footer-decoration">
|
||||||
|
<span class="geo-symbol">◆</span>
|
||||||
|
<span class="geo-symbol">■</span>
|
||||||
|
<span class="geo-symbol">▲</span>
|
||||||
|
<span class="geo-symbol">●</span>
|
||||||
|
<span class="geo-symbol">★</span>
|
||||||
|
</div>
|
||||||
<p>数据来源于头条热搜榜</p>
|
<p>数据来源于头条热搜榜</p>
|
||||||
|
<div class="footer-decoration">
|
||||||
|
<span class="geo-symbol">★</span>
|
||||||
|
<span class="geo-symbol">●</span>
|
||||||
|
<span class="geo-symbol">▲</span>
|
||||||
|
<span class="geo-symbol">■</span>
|
||||||
|
<span class="geo-symbol">◆</span>
|
||||||
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -38,29 +38,37 @@ function formatNumber(num) {
|
|||||||
function renderHotList(data) {
|
function renderHotList(data) {
|
||||||
hotListElement.innerHTML = '';
|
hotListElement.innerHTML = '';
|
||||||
|
|
||||||
|
// 几何装饰符号数组
|
||||||
|
const geometricSymbols = ['◆', '■', '▲', '●', '★', '◈', '◇', '□', '△', '○'];
|
||||||
|
|
||||||
data.forEach((item, index) => {
|
data.forEach((item, index) => {
|
||||||
const hotItem = document.createElement('div');
|
const hotItem = document.createElement('div');
|
||||||
hotItem.className = 'hot-item';
|
hotItem.className = 'hot-item';
|
||||||
|
|
||||||
const rankClass = index < 3 ? `top-${index + 1}` : '';
|
const rankClass = index < 3 ? `top-${index + 1}` : '';
|
||||||
|
|
||||||
|
// 随机选择几何符号作为装饰
|
||||||
|
const randomSymbol = geometricSymbols[index % geometricSymbols.length];
|
||||||
|
|
||||||
// 处理热度值显示
|
// 处理热度值显示
|
||||||
const hotValueDisplay = item.hot_value ?
|
const hotValueDisplay = item.hot_value ?
|
||||||
`<div class="stat-item"><span class="hot-value">${formatNumber(item.hot_value)} 热度</span></div>` : '';
|
`<div class="stat-item"><span class="hot-value">${randomSymbol} ${formatNumber(item.hot_value)} 热度</span></div>` : '';
|
||||||
|
|
||||||
// 处理标签显示
|
// 处理标签显示
|
||||||
const tagDisplay = item.tag ?
|
const tagDisplay = item.tag ?
|
||||||
`<div class="stat-item"><span class="hot-tag">${item.tag}</span></div>` : '';
|
`<div class="stat-item"><span class="hot-tag">${randomSymbol} ${item.tag}</span></div>` : '';
|
||||||
|
|
||||||
hotItem.innerHTML = `
|
hotItem.innerHTML = `
|
||||||
<div class="hot-rank ${rankClass}">${index + 1}</div>
|
<div class="hot-rank ${rankClass}">${index + 1}</div>
|
||||||
<div class="hot-content">
|
<div class="hot-content">
|
||||||
<a href="${item.link}" class="hot-title" target="_blank">${item.title}</a>
|
<a href="${item.link}" class="hot-title" target="_blank">
|
||||||
|
<span class="title-decoration">${randomSymbol}</span> ${item.title}
|
||||||
|
</a>
|
||||||
<div class="hot-stats">
|
<div class="hot-stats">
|
||||||
${hotValueDisplay}
|
${hotValueDisplay}
|
||||||
${tagDisplay}
|
${tagDisplay}
|
||||||
${item.source ? `<div class="stat-item">📰 ${item.source}</div>` : ''}
|
${item.source ? `<div class="stat-item"><span class="source-icon">${randomSymbol}</span> ${item.source}</div>` : ''}
|
||||||
${item.time ? `<div class="stat-item">🕒 ${item.time}</div>` : ''}
|
${item.time ? `<div class="stat-item"><span class="time-icon">${randomSymbol}</span> ${item.time}</div>` : ''}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
@@ -68,6 +76,17 @@ function renderHotList(data) {
|
|||||||
hotListElement.appendChild(hotItem);
|
hotListElement.appendChild(hotItem);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 添加几何装饰到列表项
|
||||||
|
const hotItems = document.querySelectorAll('.hot-item');
|
||||||
|
hotItems.forEach((item, index) => {
|
||||||
|
// 为奇数和偶数项添加不同的装饰类
|
||||||
|
if (index % 2 === 0) {
|
||||||
|
item.classList.add('even-item');
|
||||||
|
} else {
|
||||||
|
item.classList.add('odd-item');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 更新时间
|
// 更新时间
|
||||||
updateTimeElement.textContent = `更新时间:${formatDate(new Date())}`;
|
updateTimeElement.textContent = `更新时间:${formatDate(new Date())}`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,28 +6,25 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
background-color: #f8f9fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rainbow-gradient {
|
.modern-gradient {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -50%;
|
top: -50%;
|
||||||
left: -50%;
|
left: -50%;
|
||||||
width: 200%;
|
width: 200%;
|
||||||
height: 200%;
|
height: 200%;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
217deg,
|
135deg,
|
||||||
rgba(255, 0, 0, 0.6),
|
rgba(230, 22, 45, 0.4) 0%,
|
||||||
rgba(255, 0, 0, 0) 70.71%
|
rgba(245, 80, 80, 0.3) 25%,
|
||||||
), linear-gradient(
|
rgba(250, 120, 110, 0.2) 50%,
|
||||||
127deg,
|
rgba(255, 140, 140, 0.3) 75%,
|
||||||
rgba(0, 255, 0, 0.6),
|
rgba(255, 90, 90, 0.4) 100%
|
||||||
rgba(0, 255, 0, 0) 70.71%
|
|
||||||
), linear-gradient(
|
|
||||||
336deg,
|
|
||||||
rgba(0, 0, 255, 0.6),
|
|
||||||
rgba(0, 0, 255, 0) 70.71%
|
|
||||||
);
|
);
|
||||||
animation: rainbow-rotate 15s linear infinite;
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes rainbow-rotate {
|
@keyframes rainbow-rotate {
|
||||||
|
|||||||
@@ -1,3 +1,88 @@
|
|||||||
|
/* 背景样式 */
|
||||||
|
.background-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
|
position: absolute;
|
||||||
|
top: -50%;
|
||||||
|
left: -50%;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.4) 0%,
|
||||||
|
rgba(120, 192, 255, 0.3) 25%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 140, 50, 0.3) 75%,
|
||||||
|
rgba(255, 122, 69, 0.4) 100%
|
||||||
|
);
|
||||||
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient(
|
||||||
|
circle at 30% 70%,
|
||||||
|
rgba(64, 169, 255, 0.5) 0%,
|
||||||
|
transparent 50%
|
||||||
|
), radial-gradient(
|
||||||
|
circle at 70% 30%,
|
||||||
|
rgba(255, 140, 50, 0.4) 0%,
|
||||||
|
transparent 50%
|
||||||
|
);
|
||||||
|
animation: pulse-effect 15s ease-in-out infinite alternate;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes gradient-flow {
|
||||||
|
0%, 100% {
|
||||||
|
transform: rotate(0deg) scale(1);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: rotate(90deg) scale(1.1);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: rotate(180deg) scale(0.9);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: rotate(270deg) scale(1.05);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-effect {
|
||||||
|
0% {
|
||||||
|
transform: scale(1) rotate(0deg);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2) rotate(180deg);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1) rotate(360deg);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主样式 */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -7,38 +92,84 @@
|
|||||||
body {
|
body {
|
||||||
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||||
color: #333;
|
color: #333;
|
||||||
background-color: #f5f5f5;
|
background-color: #f8f9fa;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 微博Logo样式 */
|
||||||
|
.title-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weibo-logo-container {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weibo-logo {
|
||||||
|
background-color: #e6162d;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 4px 10px;
|
||||||
|
border-radius: 15px;
|
||||||
|
font-size: 16px;
|
||||||
|
display: inline-block;
|
||||||
|
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Q版眨眼动画样式 */
|
||||||
|
.qeye-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qeye {
|
||||||
|
width: 80px;
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 20px;
|
padding: 24px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: rgba(255, 255, 255, 0.85);
|
background-color: rgba(255, 255, 255, 0.85);
|
||||||
border-radius: 10px;
|
border-radius: 16px;
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 28px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 20px;
|
||||||
border-bottom: 1px solid #eaeaea;
|
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
color: #07a35a;
|
background: linear-gradient(135deg, #4096ff, #ff7a45);
|
||||||
margin-bottom: 10px;
|
-webkit-background-clip: text;
|
||||||
font-size: 2rem;
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
font-size: 2.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.update-time {
|
.update-time {
|
||||||
color: #888;
|
color: #666;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-radius: 24px;
|
||||||
|
display: inline-block;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-list {
|
.hot-list {
|
||||||
@@ -46,36 +177,52 @@ header h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 15px;
|
padding: 20px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 16px;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||||
transition: transform 0.2s, box-shadow 0.2s;
|
transition: all 0.3s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-item:hover {
|
.hot-item:hover {
|
||||||
transform: translateY(-2px);
|
transform: translateY(-3px);
|
||||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||||
|
border-color: rgba(64, 169, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank {
|
.hot-rank {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #ff8200;
|
color: #4096ff;
|
||||||
margin-right: 15px;
|
margin-right: 18px;
|
||||||
min-width: 30px;
|
min-width: 38px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
background-color: rgba(64, 169, 255, 0.1);
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank.top-1 {
|
.hot-rank.top-1 {
|
||||||
color: #ff4500;
|
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-rank.top-2, .hot-rank.top-3 {
|
.hot-rank.top-2 {
|
||||||
color: #ff6600;
|
background: linear-gradient(135deg, #ff7a45, #ffa940);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank.top-3 {
|
||||||
|
background: linear-gradient(135deg, #ffa940, #ffec3d);
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-content {
|
.hot-content {
|
||||||
@@ -83,73 +230,155 @@ header h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
font-size: 1.1rem;
|
font-size: 1.15rem;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 8px;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title:hover {
|
.hot-title:hover {
|
||||||
color: #07a35a;
|
color: #4096ff;
|
||||||
}
|
text-decoration: none;
|
||||||
|
|
||||||
.hot-value {
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: #888;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 20px;
|
padding: 40px;
|
||||||
color: #888;
|
color: #666;
|
||||||
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
padding-top: 15px;
|
padding-top: 20px;
|
||||||
border-top: 1px solid #eaeaea;
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
color: #888;
|
color: #666;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 响应式设计 */
|
/* 响应式设计 */
|
||||||
/* 手机端 */
|
@media (max-width: 1024px) and (min-width: 768px) {
|
||||||
@media (max-width: 576px) {
|
|
||||||
.container {
|
.container {
|
||||||
padding: 15px;
|
max-width: 90%;
|
||||||
margin: 10px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
font-size: 1.5rem;
|
font-size: 2.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-item {
|
.hot-item {
|
||||||
padding: 12px;
|
padding: 18px;
|
||||||
}
|
|
||||||
|
|
||||||
.hot-rank {
|
|
||||||
font-size: 1rem;
|
|
||||||
min-width: 25px;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-title {
|
.hot-title {
|
||||||
font-size: 1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 平板端 */
|
@media (max-width: 768px) {
|
||||||
@media (min-width: 577px) and (max-width: 992px) {
|
body {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 90%;
|
max-width: 95%;
|
||||||
|
margin: 12px auto;
|
||||||
|
padding: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-time {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
padding: 6px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item {
|
||||||
|
padding: 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin-right: 14px;
|
||||||
|
min-width: 32px;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 24px;
|
||||||
|
padding-top: 16px;
|
||||||
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 电脑端 - 默认样式已经设置 */
|
@media (max-width: 480px) {
|
||||||
|
.container {
|
||||||
|
margin: 8px auto;
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item {
|
||||||
|
padding: 14px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank {
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-right: 12px;
|
||||||
|
min-width: 30px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 减少动画以节省电池 */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.modern-gradient,
|
||||||
|
.modern-gradient::before {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.3) 0%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 122, 69, 0.25) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
frontend/60sapi/热搜榜单/微博热搜榜/img/qeye.svg
Normal file
42
frontend/60sapi/热搜榜单/微博热搜榜/img/qeye.svg
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="100" height="60" viewBox="0 0 100 60" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<!-- 脸部 -->
|
||||||
|
<circle cx="50" cy="30" r="25" fill="#FFD6A5" />
|
||||||
|
|
||||||
|
<!-- 左眼 -->
|
||||||
|
<g id="left-eye">
|
||||||
|
<circle cx="40" cy="25" r="5" fill="white" />
|
||||||
|
<circle cx="40" cy="25" r="2.5" fill="#333" class="pupil" />
|
||||||
|
<!-- 眨眼动画 -->
|
||||||
|
<animate
|
||||||
|
xlink:href="#left-eye"
|
||||||
|
attributeName="transform"
|
||||||
|
attributeType="XML"
|
||||||
|
type="scale"
|
||||||
|
values="1 1; 1 0.1; 1 1"
|
||||||
|
dur="3s"
|
||||||
|
repeatCount="indefinite" />
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- 右眼 -->
|
||||||
|
<g id="right-eye">
|
||||||
|
<circle cx="60" cy="25" r="5" fill="white" />
|
||||||
|
<circle cx="60" cy="25" r="2.5" fill="#333" class="pupil" />
|
||||||
|
<!-- 眨眼动画 -->
|
||||||
|
<animate
|
||||||
|
xlink:href="#right-eye"
|
||||||
|
attributeName="transform"
|
||||||
|
attributeType="XML"
|
||||||
|
type="scale"
|
||||||
|
values="1 1; 1 0.1; 1 1"
|
||||||
|
dur="3s"
|
||||||
|
repeatCount="indefinite" />
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- 嘴巴 -->
|
||||||
|
<path d="M45,35 Q50,40 55,35" stroke="#FF9999" stroke-width="2" fill="none" />
|
||||||
|
|
||||||
|
<!-- 腮红 -->
|
||||||
|
<circle cx="35" cy="30" r="3" fill="#FF9999" opacity="0.5" />
|
||||||
|
<circle cx="65" cy="30" r="3" fill="#FF9999" opacity="0.5" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -9,12 +9,12 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="background-container">
|
<div class="background-container">
|
||||||
<div class="rainbow-gradient"></div>
|
<div class="modern-gradient"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header>
|
<header>
|
||||||
<h1>微博热搜榜</h1>
|
<h1>🌈 微博热搜榜 🌈</h1>
|
||||||
<div class="update-time" id="updateTime"></div>
|
<div class="update-time" id="updateTime"></div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,88 @@
|
|||||||
/* 猫眼票房排行榜 - 淡绿色清新风格样式 */
|
/* 背景样式 */
|
||||||
|
.background-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
/* 重置样式 */
|
.modern-gradient {
|
||||||
|
position: absolute;
|
||||||
|
top: -50%;
|
||||||
|
left: -50%;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.4) 0%,
|
||||||
|
rgba(120, 192, 255, 0.3) 25%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 140, 50, 0.3) 75%,
|
||||||
|
rgba(255, 122, 69, 0.4) 100%
|
||||||
|
);
|
||||||
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient(
|
||||||
|
circle at 30% 70%,
|
||||||
|
rgba(64, 169, 255, 0.5) 0%,
|
||||||
|
transparent 50%
|
||||||
|
), radial-gradient(
|
||||||
|
circle at 70% 30%,
|
||||||
|
rgba(255, 140, 50, 0.4) 0%,
|
||||||
|
transparent 50%
|
||||||
|
);
|
||||||
|
animation: pulse-effect 15s ease-in-out infinite alternate;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes gradient-flow {
|
||||||
|
0%, 100% {
|
||||||
|
transform: rotate(0deg) scale(1);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: rotate(90deg) scale(1.1);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: rotate(180deg) scale(0.9);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: rotate(270deg) scale(1.05);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-effect {
|
||||||
|
0% {
|
||||||
|
transform: scale(1) rotate(0deg);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2) rotate(180deg);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1) rotate(360deg);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主样式 */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -8,488 +90,260 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||||
background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 50%, #ffd3a5 100%);
|
color: #333;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
color: #2d5016;
|
|
||||||
line-height: 1.6;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 1200px;
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 20px;
|
padding: 24px;
|
||||||
}
|
|
||||||
|
|
||||||
/* 头部样式 */
|
|
||||||
.header {
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
background: rgba(255, 255, 255, 0.85);
|
|
||||||
border-radius: 20px;
|
|
||||||
padding: 30px;
|
|
||||||
box-shadow: 0 8px 25px rgba(45, 80, 22, 0.08);
|
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.header h1 {
|
|
||||||
font-size: 2.5rem;
|
|
||||||
color: #2d5016;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
font-weight: 700;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header p {
|
|
||||||
color: #5a7c65;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 加载状态 */
|
|
||||||
.loading {
|
|
||||||
text-align: center;
|
|
||||||
padding: 40px;
|
|
||||||
background: rgba(255, 255, 255, 0.85);
|
|
||||||
border-radius: 15px;
|
|
||||||
box-shadow: 0 5px 20px rgba(45, 80, 22, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
border: 4px solid #e8f5e8;
|
|
||||||
border-top: 4px solid #81c784;
|
|
||||||
border-radius: 50%;
|
|
||||||
animation: spin 1s linear infinite;
|
|
||||||
margin: 0 auto 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
0% { transform: rotate(0deg); }
|
|
||||||
100% { transform: rotate(360deg); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 票房排行榜容器 */
|
|
||||||
.ranking-container {
|
|
||||||
background: rgba(255, 255, 255, 0.85);
|
|
||||||
border-radius: 20px;
|
|
||||||
padding: 30px;
|
|
||||||
box-shadow: 0 8px 25px rgba(45, 80, 22, 0.08);
|
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 排行榜标题 */
|
|
||||||
.ranking-title {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 1.8rem;
|
|
||||||
font-weight: 700;
|
|
||||||
color: #2d5016;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 票房排行榜列表 */
|
|
||||||
.movie-list {
|
|
||||||
display: grid;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 电影项目 */
|
|
||||||
.movie-item {
|
|
||||||
background: rgba(255, 255, 255, 0.9);
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 20px;
|
|
||||||
box-shadow: 0 4px 15px rgba(45, 80, 22, 0.05);
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
border-left: 5px solid transparent;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
z-index: 1;
|
||||||
|
background-color: rgba(255, 255, 255, 0.85);
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-item:hover {
|
header {
|
||||||
transform: translateY(-2px);
|
text-align: center;
|
||||||
box-shadow: 0 8px 25px rgba(45, 80, 22, 0.12);
|
margin-bottom: 28px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 前三名特殊样式 */
|
header h1 {
|
||||||
.movie-item.top-1 {
|
background: linear-gradient(135deg, #4096ff, #ff7a45);
|
||||||
border-left-color: #ffd700;
|
-webkit-background-clip: text;
|
||||||
background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
font-size: 2.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-item.top-2 {
|
.update-time {
|
||||||
border-left-color: #c0c0c0;
|
color: #666;
|
||||||
background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
|
font-size: 0.9rem;
|
||||||
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-radius: 24px;
|
||||||
|
display: inline-block;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-item.top-3 {
|
.hot-list {
|
||||||
border-left-color: #cd7f32;
|
list-style: none;
|
||||||
background: linear-gradient(135deg, rgba(205, 127, 50, 0.1) 0%, rgba(255, 255, 255, 0.9) 100%);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 排名徽章 */
|
.hot-item {
|
||||||
.rank-badge {
|
padding: 20px;
|
||||||
position: absolute;
|
margin-bottom: 16px;
|
||||||
top: -10px;
|
border-radius: 12px;
|
||||||
right: -10px;
|
background-color: white;
|
||||||
width: 50px;
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||||
height: 50px;
|
transition: all 0.3s ease;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item:hover {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||||
|
border-color: rgba(64, 169, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #4096ff;
|
||||||
|
margin-right: 18px;
|
||||||
|
min-width: 38px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(64, 169, 255, 0.1);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-weight: bold;
|
}
|
||||||
font-size: 1.2rem;
|
|
||||||
|
.hot-rank.top-1 {
|
||||||
|
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
|
||||||
color: white;
|
color: white;
|
||||||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-badge.gold {
|
.hot-rank.top-2 {
|
||||||
background: linear-gradient(135deg, #ffd700, #ffed4a);
|
background: linear-gradient(135deg, #ff7a45, #ffa940);
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-badge.silver {
|
.hot-rank.top-3 {
|
||||||
background: linear-gradient(135deg, #c0c0c0, #e2e8f0);
|
background: linear-gradient(135deg, #ffa940, #ffec3d);
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-badge.bronze {
|
.hot-content {
|
||||||
background: linear-gradient(135deg, #cd7f32, #d69e2e);
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-badge.regular {
|
|
||||||
background: linear-gradient(135deg, #81c784, #66bb6a);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 电影信息布局 */
|
|
||||||
.movie-info {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: auto 1fr auto;
|
|
||||||
align-items: center;
|
|
||||||
gap: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-number {
|
|
||||||
font-size: 2rem;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #2d5016;
|
|
||||||
min-width: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-details {
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-name {
|
.hot-title {
|
||||||
font-size: 1.3rem;
|
font-size: 1.15rem;
|
||||||
font-weight: 700;
|
|
||||||
color: #2d5016;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-year {
|
|
||||||
color: #5a7c65;
|
|
||||||
font-size: 0.95rem;
|
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
|
color: #333;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-office {
|
.hot-title:hover {
|
||||||
text-align: right;
|
color: #4096ff;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-office-amount {
|
.loading {
|
||||||
font-size: 1.4rem;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #1b5e20;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box-office-desc {
|
|
||||||
color: #5a7c65;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 统计信息 */
|
|
||||||
.stats-container {
|
|
||||||
background: rgba(255, 255, 255, 0.85);
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 20px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
box-shadow: 0 5px 20px rgba(45, 80, 22, 0.08);
|
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.stats-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
||||||
gap: 20px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
background: rgba(129, 199, 132, 0.1);
|
|
||||||
border-radius: 10px;
|
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-value {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #2d5016;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-label {
|
|
||||||
color: #5a7c65;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 更新时间 */
|
|
||||||
.update-time {
|
|
||||||
text-align: center;
|
|
||||||
color: #5a7c65;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin-top: 20px;
|
|
||||||
padding: 15px;
|
|
||||||
background: rgba(255, 255, 255, 0.7);
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 错误提示 */
|
|
||||||
.error {
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
background: rgba(255, 255, 255, 0.85);
|
color: #666;
|
||||||
border-radius: 15px;
|
font-size: 1.1rem;
|
||||||
box-shadow: 0 5px 20px rgba(45, 80, 22, 0.08);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.error h3 {
|
footer {
|
||||||
color: #d32f2f;
|
text-align: center;
|
||||||
margin-bottom: 15px;
|
margin-top: 30px;
|
||||||
font-size: 1.5rem;
|
padding-top: 20px;
|
||||||
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
|
color: #666;
|
||||||
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error p {
|
/* 响应式设计 */
|
||||||
color: #5a7c65;
|
@media (max-width: 1024px) and (min-width: 768px) {
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 动画效果 */
|
|
||||||
.fade-in {
|
|
||||||
animation: fadeIn 0.6s ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadeIn {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(20px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 平板端适配 (768px - 1024px) */
|
|
||||||
@media screen and (max-width: 1024px) and (min-width: 768px) {
|
|
||||||
.container {
|
.container {
|
||||||
padding: 15px;
|
max-width: 90%;
|
||||||
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header h1 {
|
header h1 {
|
||||||
font-size: 2.2rem;
|
font-size: 2.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ranking-container {
|
.hot-item {
|
||||||
padding: 25px;
|
padding: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-info {
|
.hot-title {
|
||||||
gap: 15px;
|
font-size: 1.1rem;
|
||||||
}
|
|
||||||
|
|
||||||
.rank-number {
|
|
||||||
font-size: 1.8rem;
|
|
||||||
min-width: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-name {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box-office-amount {
|
|
||||||
font-size: 1.3rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 手机端适配 (最大767px) - 优先优化 */
|
@media (max-width: 768px) {
|
||||||
@media screen and (max-width: 767px) {
|
body {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
padding: 10px;
|
max-width: 95%;
|
||||||
|
margin: 12px auto;
|
||||||
|
padding: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
header {
|
||||||
padding: 20px;
|
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header h1 {
|
header h1 {
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
flex-direction: column;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header p {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ranking-container {
|
|
||||||
padding: 20px 15px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ranking-title {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-item {
|
|
||||||
padding: 15px;
|
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-info {
|
|
||||||
grid-template-columns: 50px 1fr;
|
|
||||||
grid-template-rows: auto auto;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-number {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
min-width: 40px;
|
|
||||||
grid-row: 1 / 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-details {
|
|
||||||
grid-column: 2;
|
|
||||||
grid-row: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box-office {
|
|
||||||
grid-column: 2;
|
|
||||||
grid-row: 2;
|
|
||||||
text-align: left;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-name {
|
|
||||||
font-size: 1.1rem;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-year {
|
|
||||||
font-size: 0.85rem;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box-office-amount {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box-office-desc {
|
|
||||||
font-size: 0.85rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-badge {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
font-size: 1rem;
|
|
||||||
top: -8px;
|
|
||||||
right: -8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stats-grid {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
padding: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-value {
|
|
||||||
font-size: 1.3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-time {
|
.update-time {
|
||||||
padding: 12px;
|
font-size: 0.85rem;
|
||||||
|
padding: 6px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item {
|
||||||
|
padding: 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin-right: 14px;
|
||||||
|
min-width: 32px;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 24px;
|
||||||
|
padding-top: 16px;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 小屏手机适配 (最大480px) */
|
@media (max-width: 480px) {
|
||||||
@media screen and (max-width: 480px) {
|
|
||||||
.container {
|
.container {
|
||||||
padding: 8px;
|
margin: 8px auto;
|
||||||
|
padding: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
header h1 {
|
||||||
padding: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header h1 {
|
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ranking-container {
|
.hot-item {
|
||||||
padding: 15px 10px;
|
padding: 14px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.movie-item {
|
.hot-rank {
|
||||||
padding: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-name {
|
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
margin-right: 12px;
|
||||||
|
min-width: 30px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-office-amount {
|
.hot-title {
|
||||||
font-size: 1.1rem;
|
font-size: 0.95rem;
|
||||||
}
|
|
||||||
|
|
||||||
.rank-number {
|
|
||||||
font-size: 1.3rem;
|
|
||||||
min-width: 35px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 高分辨率显示器优化 */
|
/* 减少动画以节省电池 */
|
||||||
@media screen and (min-width: 1440px) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.container {
|
.modern-gradient,
|
||||||
max-width: 1400px;
|
.modern-gradient::before {
|
||||||
|
animation: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header h1 {
|
.modern-gradient {
|
||||||
font-size: 3rem;
|
background: linear-gradient(
|
||||||
}
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.3) 0%,
|
||||||
.movie-list {
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
gap: 20px;
|
rgba(255, 122, 69, 0.25) 100%
|
||||||
}
|
);
|
||||||
|
|
||||||
.movie-item {
|
|
||||||
padding: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.movie-name {
|
|
||||||
font-size: 1.4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box-office-amount {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -186,10 +186,18 @@ function renderMovieItem(item) {
|
|||||||
const rank = item.rank;
|
const rank = item.rank;
|
||||||
const cls = rank === 1 ? 'top-1' : rank === 2 ? 'top-2' : rank === 3 ? 'top-3' : '';
|
const cls = rank === 1 ? 'top-1' : rank === 2 ? 'top-2' : rank === 3 ? 'top-3' : '';
|
||||||
const badgeCls = rank === 1 ? 'gold' : rank === 2 ? 'silver' : rank === 3 ? 'bronze' : 'regular';
|
const badgeCls = rank === 1 ? 'gold' : rank === 2 ? 'silver' : rank === 3 ? 'bronze' : 'regular';
|
||||||
|
|
||||||
|
// 使用猫眼ID获取电影海报图片 - 使用更可靠的图片源
|
||||||
|
const posterUrl = `https://img.maoyan.com/movie/poster/1${item.maoyan_id}.jpg`;
|
||||||
|
// 备用图片源
|
||||||
|
const backupPosterUrl = `https://p0.pipi.cn/mmdb/fb738633ac80c2f8a7a48e5b465128${item.maoyan_id % 10}/${item.maoyan_id}.jpg?imageView2/1/w/160/h/220`;
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div class="movie-item ${cls}">
|
<div class="movie-item ${cls}">
|
||||||
<div class="rank-badge ${badgeCls}">${rank}</div>
|
<div class="rank-badge ${badgeCls}">${rank}</div>
|
||||||
|
<div class="movie-poster">
|
||||||
|
<img src="${posterUrl}" alt="${escapeHtml(item.movie_name)}" onerror="this.onerror=null; this.src='${backupPosterUrl}'; this.onerror=function(){this.src='data:image/svg+xml;charset=utf-8,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%22160%22 height%3D%22220%22 viewBox%3D%220 0 160 220%22%3E%3Crect fill%3D%22%23f0f0f0%22 width%3D%22160%22 height%3D%22220%22%2F%3E%3Ctext fill%3D%22%23999%22 font-family%3D%22Arial%2CSans-serif%22 font-size%3D%2216%22 x%3D%2250%25%22 y%3D%2250%25%22 text-anchor%3D%22middle%22 dominant-baseline%3D%22middle%22%3E无图片%3C%2Ftext%3E%3C%2Fsvg%3E';}">
|
||||||
|
</div>
|
||||||
<div class="movie-info">
|
<div class="movie-info">
|
||||||
<div class="rank-number">#${rank}</div>
|
<div class="rank-number">#${rank}</div>
|
||||||
<div class="movie-details">
|
<div class="movie-details">
|
||||||
|
|||||||
@@ -16,13 +16,14 @@
|
|||||||
height: 200%;
|
height: 200%;
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
135deg,
|
135deg,
|
||||||
rgba(76, 175, 80, 0.3) 0%,
|
rgba(0, 132, 255, 0.4) 0%,
|
||||||
rgba(129, 199, 132, 0.2) 25%,
|
rgba(0, 132, 255, 0.3) 25%,
|
||||||
rgba(165, 214, 167, 0.1) 50%,
|
rgba(0, 132, 255, 0.2) 50%,
|
||||||
rgba(200, 230, 201, 0.2) 75%,
|
rgba(0, 132, 255, 0.3) 75%,
|
||||||
rgba(76, 175, 80, 0.3) 100%
|
rgba(0, 132, 255, 0.4) 100%
|
||||||
);
|
);
|
||||||
animation: green-flow 20s ease-in-out infinite;
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.green-gradient::before {
|
.green-gradient::before {
|
||||||
|
|||||||
@@ -1,3 +1,88 @@
|
|||||||
|
/* 背景样式 */
|
||||||
|
.background-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
|
position: absolute;
|
||||||
|
top: -50%;
|
||||||
|
left: -50%;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.4) 0%,
|
||||||
|
rgba(120, 192, 255, 0.3) 25%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 140, 50, 0.3) 75%,
|
||||||
|
rgba(255, 122, 69, 0.4) 100%
|
||||||
|
);
|
||||||
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient(
|
||||||
|
circle at 30% 70%,
|
||||||
|
rgba(64, 169, 255, 0.5) 0%,
|
||||||
|
transparent 50%
|
||||||
|
), radial-gradient(
|
||||||
|
circle at 70% 30%,
|
||||||
|
rgba(255, 140, 50, 0.4) 0%,
|
||||||
|
transparent 50%
|
||||||
|
);
|
||||||
|
animation: pulse-effect 15s ease-in-out infinite alternate;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes gradient-flow {
|
||||||
|
0%, 100% {
|
||||||
|
transform: rotate(0deg) scale(1);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: rotate(90deg) scale(1.1);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: rotate(180deg) scale(0.9);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: rotate(270deg) scale(1.05);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-effect {
|
||||||
|
0% {
|
||||||
|
transform: scale(1) rotate(0deg);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2) rotate(180deg);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1) rotate(360deg);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主样式 */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -7,172 +92,129 @@
|
|||||||
body {
|
body {
|
||||||
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||||
color: #333;
|
color: #333;
|
||||||
background-color: #f0f8f0;
|
background-color: #f8f9fa;
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 900px;
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 20px;
|
padding: 24px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
background-color: rgba(255, 255, 255, 0.9);
|
background-color: rgba(255, 255, 255, 0.85);
|
||||||
border-radius: 12px;
|
border-radius: 16px;
|
||||||
box-shadow: 0 4px 16px rgba(0, 128, 0, 0.1);
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 28px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
border-bottom: 2px solid #e8f5e8;
|
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
color: #2d8f47;
|
background: linear-gradient(135deg, #4096ff, #ff7a45);
|
||||||
margin-bottom: 12px;
|
-webkit-background-clip: text;
|
||||||
font-size: 2.2rem;
|
background-clip: text;
|
||||||
font-weight: 600;
|
color: transparent;
|
||||||
text-shadow: 0 2px 4px rgba(45, 143, 71, 0.1);
|
margin-bottom: 14px;
|
||||||
|
font-size: 2.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.update-time {
|
.update-time {
|
||||||
color: #6b8e6b;
|
color: #666;
|
||||||
font-size: 0.95rem;
|
font-size: 0.9rem;
|
||||||
background-color: #f0f8f0;
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
padding: 8px 16px;
|
padding: 8px 16px;
|
||||||
border-radius: 20px;
|
border-radius: 24px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-list {
|
.hot-list {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-item {
|
.hot-item {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 16px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
box-shadow: 0 3px 10px rgba(0, 128, 0, 0.08);
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
border-left: 4px solid transparent;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topic-item:hover {
|
|
||||||
transform: translateY(-3px);
|
|
||||||
box-shadow: 0 6px 20px rgba(0, 128, 0, 0.15);
|
|
||||||
border-left-color: #4caf50;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topic-header {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: center;
|
||||||
margin-bottom: 12px;
|
border: 1px solid rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-rank {
|
.hot-item:hover {
|
||||||
font-size: 1.3rem;
|
transform: translateY(-3px);
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||||
|
border-color: rgba(64, 169, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank {
|
||||||
|
font-size: 1.2rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #4caf50;
|
color: #4096ff;
|
||||||
margin-right: 18px;
|
margin-right: 18px;
|
||||||
min-width: 35px;
|
min-width: 38px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #f0f8f0;
|
background-color: rgba(64, 169, 255, 0.1);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 35px;
|
width: 38px;
|
||||||
height: 35px;
|
height: 38px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-rank.top-1 {
|
.hot-rank.top-1 {
|
||||||
background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
|
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-rank.top-2 {
|
.hot-rank.top-2 {
|
||||||
background: linear-gradient(135deg, #ffa726, #ffb74d);
|
background: linear-gradient(135deg, #ff7a45, #ffa940);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-rank.top-3 {
|
.hot-rank.top-3 {
|
||||||
background: linear-gradient(135deg, #ffca28, #ffd54f);
|
background: linear-gradient(135deg, #ffa940, #ffec3d);
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-content {
|
.hot-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-title {
|
.hot-title {
|
||||||
font-size: 1.2rem;
|
font-size: 1.15rem;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
color: #2c3e2c;
|
color: #333;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.4;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topic-title:hover {
|
|
||||||
color: #2d8f47;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topic-detail {
|
|
||||||
font-size: 0.95rem;
|
|
||||||
color: #666;
|
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-bottom: 10px;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topic-stats {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: #888;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hot-value {
|
|
||||||
background: linear-gradient(135deg, #4caf50, #66bb6a);
|
|
||||||
color: white;
|
|
||||||
padding: 4px 8px;
|
|
||||||
border-radius: 12px;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 0.8rem;
|
transition: color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-cover {
|
.hot-title:hover {
|
||||||
width: 80px;
|
color: #4096ff;
|
||||||
height: 60px;
|
text-decoration: none;
|
||||||
border-radius: 8px;
|
|
||||||
object-fit: cover;
|
|
||||||
margin-left: 15px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
color: #6b8e6b;
|
color: #666;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,20 +222,157 @@ footer {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
border-top: 1px solid #e8f5e8;
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
color: #6b8e6b;
|
color: #666;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 平板端适配 (768px - 1024px) */
|
/* 新增样式 */
|
||||||
|
.topic-header {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: flex-start;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 短内容时的布局 - 图片在右侧 */
|
||||||
|
.topic-header.short-content {
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 长内容时的布局 - 图片在下方 */
|
||||||
|
.topic-header.long-content {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-rank {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #4096ff;
|
||||||
|
margin-right: 16px;
|
||||||
|
min-width: 36px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(64, 169, 255, 0.1);
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-rank.top-1 {
|
||||||
|
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-rank.top-2 {
|
||||||
|
background: linear-gradient(135deg, #ff7a45, #ffa940);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-rank.top-3 {
|
||||||
|
background: linear-gradient(135deg, #ffa940, #ffec3d);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-content {
|
||||||
|
flex: 1;
|
||||||
|
padding-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-title {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #333;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-weight: 600;
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-title:hover {
|
||||||
|
color: #4096ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-detail {
|
||||||
|
color: #666;
|
||||||
|
font-size: 0.95rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
text-align: justify;
|
||||||
|
text-indent: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-stats {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
margin-top: 8px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-value {
|
||||||
|
color: #ff4d4f;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 短内容时的图片样式 - 在右侧 */
|
||||||
|
.short-content .topic-cover {
|
||||||
|
width: 120px;
|
||||||
|
height: 80px;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
align-self: center;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 长内容时的图片样式 - 在下方 */
|
||||||
|
.long-content .topic-cover {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
max-height: none;
|
||||||
|
object-fit: contain;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
margin-top: 12px;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-item {
|
||||||
|
padding: 20px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.topic-item:hover {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||||
|
border-color: rgba(64, 169, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
@media (max-width: 1024px) and (min-width: 768px) {
|
@media (max-width: 1024px) and (min-width: 768px) {
|
||||||
.container {
|
.container {
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
padding: 18px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
font-size: 2rem;
|
font-size: 2.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-item {
|
.topic-item {
|
||||||
@@ -201,31 +380,30 @@ footer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.topic-title {
|
.topic-title {
|
||||||
font-size: 1.15rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-cover {
|
.topic-cover {
|
||||||
width: 70px;
|
width: 100px;
|
||||||
height: 50px;
|
height: 70px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 手机端适配 (最大768px) */
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
body {
|
body {
|
||||||
background-color: #f8fdf8;
|
background-color: #f8f9fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
max-width: 95%;
|
max-width: 95%;
|
||||||
margin: 10px auto;
|
margin: 12px auto;
|
||||||
padding: 15px;
|
padding: 16px;
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
padding-bottom: 15px;
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
@@ -241,58 +419,39 @@ footer {
|
|||||||
.topic-item {
|
.topic-item {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
border-radius: 8px;
|
border-radius: 10px;
|
||||||
}
|
|
||||||
|
|
||||||
.topic-header {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-rank {
|
.topic-rank {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
margin-right: 0;
|
margin-right: 14px;
|
||||||
margin-bottom: 10px;
|
min-width: 32px;
|
||||||
width: 30px;
|
width: 32px;
|
||||||
height: 30px;
|
height: 32px;
|
||||||
align-self: flex-start;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-title {
|
.topic-title {
|
||||||
font-size: 1.05rem;
|
font-size: 1rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-detail {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topic-stats {
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 10px;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topic-cover {
|
.topic-cover {
|
||||||
width: 60px;
|
width: 90px;
|
||||||
height: 45px;
|
height: 65px;
|
||||||
margin-left: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
margin-top: 20px;
|
margin-top: 24px;
|
||||||
padding-top: 15px;
|
padding-top: 16px;
|
||||||
font-size: 0.8rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 小屏手机适配 (最大480px) */
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.container {
|
.container {
|
||||||
margin: 5px auto;
|
margin: 8px auto;
|
||||||
padding: 12px;
|
padding: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
header h1 {
|
header h1 {
|
||||||
@@ -306,26 +465,35 @@ footer {
|
|||||||
|
|
||||||
.topic-rank {
|
.topic-rank {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
width: 28px;
|
margin-right: 12px;
|
||||||
height: 28px;
|
min-width: 30px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-title {
|
.topic-title {
|
||||||
font-size: 1rem;
|
font-size: 0.95rem;
|
||||||
}
|
|
||||||
|
|
||||||
.topic-detail {
|
|
||||||
font-size: 0.85rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.topic-cover {
|
.topic-cover {
|
||||||
width: 50px;
|
width: 80px;
|
||||||
height: 38px;
|
height: 60px;
|
||||||
margin-left: 8px;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 减少动画以节省电池 */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.modern-gradient,
|
||||||
|
.modern-gradient::before {
|
||||||
|
animation: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.update-time {
|
.modern-gradient {
|
||||||
font-size: 0.8rem;
|
background: linear-gradient(
|
||||||
padding: 5px 10px;
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.3) 0%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 122, 69, 0.25) 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
6
frontend/60sapi/热搜榜单/知乎热门话题/img/zhihu-logo.svg
Normal file
6
frontend/60sapi/热搜榜单/知乎热门话题/img/zhihu-logo.svg
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="128" height="128" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M53.29,80.035l7.32.002 2.41 8.24 13.128-8.24h15.477v-67.98H53.29v67.978zM46.2,80.035v-67.98H7.065V80.035H46.2z" fill="#0084FF"/>
|
||||||
|
<path d="M46.2,80.035v-67.98H7.065V80.035H46.2z" fill="#0084FF"/>
|
||||||
|
<path d="M60.61,26.48H40.11c0-6.505,1.76-14.58,8.04-14.58V5.88H30.79c0,4.44-3.6,20.32-11.21,19.77v6.505h12.93v49.4H16.09v6.56h54.13v-6.56H53.75v-49.4h6.86V26.48z" fill="#FFF"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 520 B |
@@ -48,21 +48,29 @@ function renderTopicList(data) {
|
|||||||
const coverImg = item.cover ?
|
const coverImg = item.cover ?
|
||||||
`<img src="${item.cover}" alt="话题封面" class="topic-cover" onerror="this.style.display='none'">` : '';
|
`<img src="${item.cover}" alt="话题封面" class="topic-cover" onerror="this.style.display='none'">` : '';
|
||||||
|
|
||||||
|
// 判断文本内容长度,决定图片位置
|
||||||
|
// 如果detail存在且长度较长,或者没有detail但标题较长,则图片放在下方
|
||||||
|
const detailLength = item.detail ? item.detail.length : 0;
|
||||||
|
const titleLength = item.title ? item.title.length : 0;
|
||||||
|
const isLongContent = detailLength > 100 || (detailLength === 0 && titleLength > 30);
|
||||||
|
|
||||||
|
// 根据内容长度决定布局类名
|
||||||
|
const layoutClass = isLongContent ? 'long-content' : 'short-content';
|
||||||
|
|
||||||
topicItem.innerHTML = `
|
topicItem.innerHTML = `
|
||||||
<div class="topic-header">
|
<div class="topic-header ${layoutClass}">
|
||||||
<div class="topic-rank ${rankClass}">${index + 1}</div>
|
<div class="topic-rank ${rankClass}">${index + 1}</div>
|
||||||
<div class="topic-content">
|
<div class="topic-content">
|
||||||
<a href="${item.link}" class="topic-title" target="_blank">${item.title}</a>
|
<a href="${item.link}" class="topic-title" target="_blank">🔥 ${item.title}</a>
|
||||||
${item.detail ? `<div class="topic-detail">${item.detail}</div>` : ''}
|
${item.detail ? `<div class="topic-detail">${item.detail}</div>` : ''}
|
||||||
<div class="topic-stats">
|
<div class="topic-stats">
|
||||||
${item.hot_value_desc ? `<div class="stat-item"><span class="hot-value">${item.hot_value_desc}</span></div>` : ''}
|
${item.hot_value_desc ? `<div class="stat-item"><span class="hot-value">🔥 ${item.hot_value_desc}</span></div>` : ''}
|
||||||
${item.answer_cnt ? `<div class="stat-item">💬 ${formatNumber(item.answer_cnt)} 回答</div>` : ''}
|
${item.answer_cnt ? `<div class="stat-item">💬 ${formatNumber(item.answer_cnt)} 回答</div>` : ''}
|
||||||
${item.follower_cnt ? `<div class="stat-item">👥 ${formatNumber(item.follower_cnt)} 关注</div>` : ''}
|
${item.follower_cnt ? `<div class="stat-item">👥 ${formatNumber(item.follower_cnt)} 关注</div>` : ''}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
${coverImg}
|
${coverImg}
|
||||||
</div>
|
</div>`;
|
||||||
`;
|
|
||||||
|
|
||||||
topicListElement.appendChild(topicItem);
|
topicListElement.appendChild(topicItem);
|
||||||
});
|
});
|
||||||
|
|||||||
128
frontend/60sapi/热搜榜单/网易云榜单列表/css/background.css
Normal file
128
frontend/60sapi/热搜榜单/网易云榜单列表/css/background.css
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
/* 网易云音乐特色背景样式 */
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
389
frontend/60sapi/热搜榜单/网易云榜单列表/css/style.css
Normal file
389
frontend/60sapi/热搜榜单/网易云榜单列表/css/style.css
Normal file
@@ -0,0 +1,389 @@
|
|||||||
|
/* 背景样式 */
|
||||||
|
.background-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
|
position: absolute;
|
||||||
|
top: -50%;
|
||||||
|
left: -50%;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.4) 0%,
|
||||||
|
rgba(120, 192, 255, 0.3) 25%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 140, 50, 0.3) 75%,
|
||||||
|
rgba(255, 122, 69, 0.4) 100%
|
||||||
|
);
|
||||||
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient(
|
||||||
|
circle at 30% 70%,
|
||||||
|
rgba(64, 169, 255, 0.5) 0%,
|
||||||
|
transparent 50%
|
||||||
|
), radial-gradient(
|
||||||
|
circle at 70% 30%,
|
||||||
|
rgba(255, 140, 50, 0.4) 0%,
|
||||||
|
transparent 50%
|
||||||
|
);
|
||||||
|
animation: pulse-effect 15s ease-in-out infinite alternate;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes gradient-flow {
|
||||||
|
0%, 100% {
|
||||||
|
transform: rotate(0deg) scale(1);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: rotate(90deg) scale(1.1);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: rotate(180deg) scale(0.9);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: rotate(270deg) scale(1.05);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-effect {
|
||||||
|
0% {
|
||||||
|
transform: scale(1) rotate(0deg);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2) rotate(180deg);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1) rotate(360deg);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主样式 */
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||||
|
color: #333;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
|
min-height: 100vh;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 24px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
background-color: rgba(255, 255, 255, 0.85);
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
background: linear-gradient(135deg, #4096ff, #ff7a45);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
background-clip: text;
|
||||||
|
color: transparent;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
font-size: 2.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-time {
|
||||||
|
color: #666;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-radius: 24px;
|
||||||
|
display: inline-block;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-list {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item {
|
||||||
|
padding: 20px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.03);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item:hover {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||||
|
border-color: rgba(64, 169, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #4096ff;
|
||||||
|
margin-right: 18px;
|
||||||
|
min-width: 38px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(64, 169, 255, 0.1);
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank.top-1 {
|
||||||
|
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank.top-2 {
|
||||||
|
background: linear-gradient(135deg, #ff7a45, #ffa940);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank.top-3 {
|
||||||
|
background: linear-gradient(135deg, #ffa940, #ffec3d);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-content {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #333;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title:hover {
|
||||||
|
color: #4096ff;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading {
|
||||||
|
text-align: center;
|
||||||
|
padding: 40px;
|
||||||
|
color: #666;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 30px;
|
||||||
|
padding-top: 20px;
|
||||||
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
|
color: #666;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 音符装饰样式 */
|
||||||
|
.music-note {
|
||||||
|
position: fixed;
|
||||||
|
font-size: 24px;
|
||||||
|
color: rgba(236, 65, 65, 0.6);
|
||||||
|
z-index: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
animation: floatNote 20s linear infinite;
|
||||||
|
text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes floatNote {
|
||||||
|
0% {
|
||||||
|
transform: translateY(0) rotate(0deg);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: translateY(-100px) rotate(180deg);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: translateY(-200px) rotate(360deg);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式设计 */
|
||||||
|
@media (max-width: 1024px) and (min-width: 768px) {
|
||||||
|
.container {
|
||||||
|
max-width: 90%;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size: 2.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item {
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.music-note {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
body {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
max-width: 95%;
|
||||||
|
margin: 12px auto;
|
||||||
|
padding: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size: 1.8rem;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.update-time {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
padding: 6px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item {
|
||||||
|
padding: 16px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin-right: 14px;
|
||||||
|
min-width: 32px;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 24px;
|
||||||
|
padding-top: 16px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.music-note {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.container {
|
||||||
|
margin: 8px auto;
|
||||||
|
padding: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-item {
|
||||||
|
padding: 14px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-rank {
|
||||||
|
font-size: 1rem;
|
||||||
|
margin-right: 12px;
|
||||||
|
min-width: 30px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.music-note {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 减少动画以节省电池 */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.modern-gradient,
|
||||||
|
.modern-gradient::before {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.3) 0%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 122, 69, 0.25) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
306
frontend/60sapi/热搜榜单/网易云榜单列表/index.html
Normal file
306
frontend/60sapi/热搜榜单/网易云榜单列表/index.html
Normal file
@@ -0,0 +1,306 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>网易云音乐榜单列表</title>
|
||||||
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<link rel="stylesheet" href="css/background.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- 音符装饰 -->
|
||||||
|
<div id="musicNotes"></div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<header class="header">
|
||||||
|
<h1 class="title">🎵 网易云音乐榜单列表</h1>
|
||||||
|
<p class="subtitle">发现音乐的魅力</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="loading" id="loading">
|
||||||
|
<div class="spinner"></div>
|
||||||
|
<p>正在加载榜单数据...</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="error" id="error" style="display: none;">
|
||||||
|
<div class="error-icon">⚠️</div>
|
||||||
|
<p class="error-message" id="errorMessage"></p>
|
||||||
|
<button class="retry-btn" id="retryBtn">重试</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rank-list" id="rankList" style="display: none;">
|
||||||
|
<!-- 榜单列表将在这里动态生成 -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<p>© 2025 网易云音乐榜单列表 - 数据来源于官方API</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// 创建音符装饰
|
||||||
|
function createMusicNotes() {
|
||||||
|
const musicNotes = document.getElementById('musicNotes');
|
||||||
|
const noteSymbols = ['♪', '♫', '♬', '♩', '♭', '♮', '♯'];
|
||||||
|
const containerWidth = window.innerWidth;
|
||||||
|
const containerHeight = window.innerHeight;
|
||||||
|
|
||||||
|
// 创建20个音符
|
||||||
|
for (let i = 0; i < 20; i++) {
|
||||||
|
const note = document.createElement('div');
|
||||||
|
note.className = 'music-note';
|
||||||
|
note.textContent = noteSymbols[Math.floor(Math.random() * noteSymbols.length)];
|
||||||
|
|
||||||
|
// 随机位置
|
||||||
|
const left = Math.random() * containerWidth;
|
||||||
|
const top = Math.random() * containerHeight;
|
||||||
|
|
||||||
|
// 随机动画延迟
|
||||||
|
const delay = Math.random() * 15;
|
||||||
|
const duration = 10 + Math.random() * 20;
|
||||||
|
|
||||||
|
note.style.left = `${left}px`;
|
||||||
|
note.style.top = `${top}px`;
|
||||||
|
note.style.animationDelay = `${delay}s`;
|
||||||
|
note.style.animationDuration = `${duration}s`;
|
||||||
|
|
||||||
|
musicNotes.appendChild(note);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 页面加载完成后创建音符
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
createMusicNotes();
|
||||||
|
});
|
||||||
|
|
||||||
|
// API接口列表
|
||||||
|
const API_ENDPOINTS = [
|
||||||
|
"https://60s.viki.moe",
|
||||||
|
"https://60s-cf.viki.moe",
|
||||||
|
"https://60s.b23.run",
|
||||||
|
"https://60s.114128.xyz",
|
||||||
|
"https://60s-cf.114128.xyz",
|
||||||
|
"https://60s.api.shumengya.top",
|
||||||
|
"https://api.03c3.cn/api/zb",
|
||||||
|
"https://api.vvhan.com/api/60s",
|
||||||
|
// 添加本地测试数据
|
||||||
|
"../返回接口.json"
|
||||||
|
];
|
||||||
|
|
||||||
|
// 当前使用的API索引
|
||||||
|
let currentApiIndex = 0;
|
||||||
|
|
||||||
|
// DOM元素
|
||||||
|
const loadingElement = document.getElementById('loading');
|
||||||
|
const errorElement = document.getElementById('error');
|
||||||
|
const errorMessageElement = document.getElementById('errorMessage');
|
||||||
|
const retryBtnElement = document.getElementById('retryBtn');
|
||||||
|
const rankListElement = document.getElementById('rankList');
|
||||||
|
|
||||||
|
// 初始化
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
loadRankList();
|
||||||
|
retryBtnElement.addEventListener('click', loadRankList);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 显示加载状态
|
||||||
|
function showLoading() {
|
||||||
|
loadingElement.style.display = 'flex';
|
||||||
|
errorElement.style.display = 'none';
|
||||||
|
rankListElement.style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 显示错误状态
|
||||||
|
function showError(message) {
|
||||||
|
loadingElement.style.display = 'none';
|
||||||
|
errorElement.style.display = 'flex';
|
||||||
|
errorMessageElement.textContent = message;
|
||||||
|
rankListElement.style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 显示榜单列表
|
||||||
|
function showRankList() {
|
||||||
|
loadingElement.style.display = 'none';
|
||||||
|
errorElement.style.display = 'none';
|
||||||
|
rankListElement.style.display = 'block';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加载榜单列表
|
||||||
|
async function loadRankList() {
|
||||||
|
showLoading();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const data = await fetchRankList();
|
||||||
|
displayRankList(data);
|
||||||
|
showRankList();
|
||||||
|
} catch (error) {
|
||||||
|
console.error('加载榜单列表失败:', error);
|
||||||
|
showError(error.message || '加载榜单列表失败,请重试');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取榜单列表数据
|
||||||
|
async function fetchRankList() {
|
||||||
|
let lastError = null;
|
||||||
|
let attemptedApis = 0;
|
||||||
|
|
||||||
|
// 尝试所有API接口
|
||||||
|
while (attemptedApis < API_ENDPOINTS.length) {
|
||||||
|
try {
|
||||||
|
const apiUrl = API_ENDPOINTS[currentApiIndex];
|
||||||
|
let url = `${apiUrl}/v2/ncm-rank-list`;
|
||||||
|
|
||||||
|
// 处理本地JSON文件
|
||||||
|
if (apiUrl.includes('返回接口.json')) {
|
||||||
|
url = apiUrl;
|
||||||
|
console.log('使用本地测试数据:', url);
|
||||||
|
}
|
||||||
|
// 针对不同API接口格式进行适配
|
||||||
|
else if (apiUrl.includes('03c3.cn') || apiUrl.includes('vvhan.com')) {
|
||||||
|
// 这些API可能有不同的路径格式,需要特殊处理
|
||||||
|
if (apiUrl.includes('03c3.cn')) {
|
||||||
|
url = `${apiUrl}/ncm/toplist`;
|
||||||
|
} else if (apiUrl.includes('vvhan.com')) {
|
||||||
|
url = `${apiUrl}/music/netease/toplist`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`尝试API ${currentApiIndex + 1}/${API_ENDPOINTS.length}:`, url);
|
||||||
|
|
||||||
|
const controller = new AbortController();
|
||||||
|
const timeoutId = setTimeout(() => controller.abort(), 8000); // 缩短超时时间
|
||||||
|
|
||||||
|
const response = await fetch(url, {
|
||||||
|
signal: controller.signal,
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json',
|
||||||
|
},
|
||||||
|
// 添加缓存控制
|
||||||
|
cache: 'no-cache',
|
||||||
|
// 添加模式
|
||||||
|
mode: apiUrl.includes('返回接口.json') ? 'same-origin' : 'cors'
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTimeout(timeoutId);
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
// 不同API可能有不同的成功状态码
|
||||||
|
if (data.code !== undefined && data.code !== 200 && data.code !== 0) {
|
||||||
|
throw new Error(data.message || data.msg || '获取数据失败');
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('API调用成功:', data);
|
||||||
|
return data;
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.warn(`API ${currentApiIndex + 1} 失败:`, error.message);
|
||||||
|
lastError = error;
|
||||||
|
currentApiIndex = (currentApiIndex + 1) % API_ENDPOINTS.length;
|
||||||
|
attemptedApis++;
|
||||||
|
|
||||||
|
if (error.name === 'AbortError') {
|
||||||
|
lastError = new Error('请求超时,请重试');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加短暂延迟,避免过快请求下一个API
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 300));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw lastError || new Error('所有API接口都无法访问,请稍后再试');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 显示榜单列表
|
||||||
|
function displayRankList(data) {
|
||||||
|
// 适配不同API返回的数据格式
|
||||||
|
let ranks = [];
|
||||||
|
|
||||||
|
// 标准格式:data.data 是数组
|
||||||
|
if (data.data && Array.isArray(data.data)) {
|
||||||
|
ranks = data.data;
|
||||||
|
}
|
||||||
|
// 03c3.cn API格式:data.result 是数组
|
||||||
|
else if (data.result && Array.isArray(data.result)) {
|
||||||
|
ranks = data.result;
|
||||||
|
}
|
||||||
|
// vvhan.com API格式:data.list 是数组
|
||||||
|
else if (data.list && Array.isArray(data.list)) {
|
||||||
|
ranks = data.list;
|
||||||
|
}
|
||||||
|
// 其他可能的格式
|
||||||
|
else if (Array.isArray(data)) {
|
||||||
|
ranks = data;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 尝试查找数据中的任何数组
|
||||||
|
for (const key in data) {
|
||||||
|
if (Array.isArray(data[key]) && data[key].length > 0) {
|
||||||
|
ranks = data[key];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ranks.length === 0) {
|
||||||
|
showError('没有找到榜单数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
rankListElement.innerHTML = '';
|
||||||
|
|
||||||
|
ranks.forEach(rank => {
|
||||||
|
// 适配不同API的字段名
|
||||||
|
const id = rank.id || rank.listId || rank.list_id || '';
|
||||||
|
const name = rank.name || rank.listName || rank.list_name || '未知榜单';
|
||||||
|
const cover = rank.cover || rank.coverImgUrl || rank.picUrl || rank.pic || 'https://p2.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg';
|
||||||
|
const description = rank.description || rank.desc || rank.updateFrequency || '暂无描述';
|
||||||
|
const updateFrequency = rank.update_frequency || rank.updateFrequency || '定期更新';
|
||||||
|
const updated = rank.updated || rank.updateTime || rank.update_time || '';
|
||||||
|
|
||||||
|
const rankItem = document.createElement('div');
|
||||||
|
rankItem.className = 'rank-item';
|
||||||
|
|
||||||
|
rankItem.innerHTML = `
|
||||||
|
<div class="rank-cover">
|
||||||
|
<img src="${cover}" alt="${name}" onerror="this.src='https://p2.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg'">
|
||||||
|
</div>
|
||||||
|
<div class="rank-info">
|
||||||
|
<h3 class="rank-name">${name}</h3>
|
||||||
|
<p class="rank-description">${description}</p>
|
||||||
|
<div class="rank-meta">
|
||||||
|
<span class="update-frequency">${updateFrequency}</span>
|
||||||
|
<span class="update-time">更新: ${formatDate(updated)}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a href="../网易云榜单详情/index.html?id=${id}&name=${encodeURIComponent(name)}" class="view-btn">查看详情</a>
|
||||||
|
`;
|
||||||
|
|
||||||
|
rankListElement.appendChild(rankItem);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 格式化日期
|
||||||
|
function formatDate(dateStr) {
|
||||||
|
if (!dateStr) return '未知';
|
||||||
|
|
||||||
|
try {
|
||||||
|
const date = new Date(dateStr);
|
||||||
|
return date.toLocaleString('zh-CN', {
|
||||||
|
year: 'numeric',
|
||||||
|
month: '2-digit',
|
||||||
|
day: '2-digit',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit'
|
||||||
|
});
|
||||||
|
} catch (e) {
|
||||||
|
return dateStr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
[
|
[
|
||||||
"https://60s.api.shumengya.top"
|
"https://60s.viki.moe",
|
||||||
|
"https://60s-cf.viki.moe",
|
||||||
|
"https://60s.b23.run",
|
||||||
|
"https://60s.114128.xyz",
|
||||||
|
"https://60s-cf.114128.xyz"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
/* 背景样式文件 */
|
/* 网易云音乐特色背景样式 */
|
||||||
body {
|
body {
|
||||||
background: linear-gradient(135deg, #E8F5E8 0%, #F1F8E9 25%, #E0F2F1 50%, #E8F5E8 75%, #F3E5F5 100%);
|
background: linear-gradient(135deg, #2b2b2b 0%, #1e1e1e 50%, #2b2b2b 100%);
|
||||||
background-size: 400% 400%;
|
background-size: 400% 400%;
|
||||||
animation: gradientShift 15s ease infinite;
|
animation: gradientShift 15s ease infinite;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 背景渐变动画 */
|
/* 背景渐变动画 */
|
||||||
@@ -19,7 +20,7 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 背景装饰元素 */
|
/* 网易云红色装饰元素 */
|
||||||
body::before {
|
body::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -28,14 +29,14 @@ body::before {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image:
|
background-image:
|
||||||
radial-gradient(circle at 20% 80%, rgba(76, 175, 80, 0.1) 0%, transparent 50%),
|
radial-gradient(circle at 20% 80%, rgba(236, 65, 65, 0.15) 0%, transparent 50%),
|
||||||
radial-gradient(circle at 80% 20%, rgba(129, 199, 132, 0.1) 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(165, 214, 167, 0.08) 0%, transparent 50%);
|
radial-gradient(circle at 40% 40%, rgba(236, 65, 65, 0.08) 0%, transparent 50%);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: -2;
|
z-index: -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 背景粒子效果 */
|
/* 音符装饰效果 */
|
||||||
body::after {
|
body::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -44,11 +45,11 @@ body::after {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image:
|
background-image:
|
||||||
radial-gradient(2px 2px at 20px 30px, rgba(76, 175, 80, 0.3), transparent),
|
radial-gradient(2px 2px at 20px 30px, rgba(236, 65, 65, 0.4), transparent),
|
||||||
radial-gradient(2px 2px at 40px 70px, rgba(129, 199, 132, 0.2), transparent),
|
radial-gradient(2px 2px at 40px 70px, rgba(236, 65, 65, 0.3), transparent),
|
||||||
radial-gradient(1px 1px at 90px 40px, rgba(165, 214, 167, 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(76, 175, 80, 0.2), transparent),
|
radial-gradient(1px 1px at 130px 80px, rgba(236, 65, 65, 0.3), transparent),
|
||||||
radial-gradient(2px 2px at 160px 30px, rgba(129, 199, 132, 0.3), transparent);
|
radial-gradient(2px 2px at 160px 30px, rgba(236, 65, 65, 0.4), transparent);
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
background-size: 200px 100px;
|
background-size: 200px 100px;
|
||||||
animation: particleFloat 20s linear infinite;
|
animation: particleFloat 20s linear infinite;
|
||||||
@@ -82,17 +83,48 @@ body::after {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 音符装饰 */
|
||||||
|
.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) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
body {
|
body {
|
||||||
animation: none;
|
animation: none;
|
||||||
background: linear-gradient(135deg, #E8F5E8 0%, #F1F8E9 50%, #E0F2F1 100%);
|
background: linear-gradient(135deg, #2b2b2b 0%, #1e1e1e 50%, #2b2b2b 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
body::after {
|
body::after {
|
||||||
animation: none;
|
animation: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.music-note {
|
||||||
|
animation: none;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
animation: none;
|
animation: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,103 @@
|
|||||||
/* 基础样式重置 */
|
/* 背景样式 */
|
||||||
|
.background-container {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: -1;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 返回链接样式 */
|
||||||
|
.back-link {
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 10px;
|
||||||
|
color: #1DB954;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-link:hover {
|
||||||
|
color: #1ed760;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient {
|
||||||
|
position: absolute;
|
||||||
|
top: -50%;
|
||||||
|
left: -50%;
|
||||||
|
width: 200%;
|
||||||
|
height: 200%;
|
||||||
|
background: linear-gradient(
|
||||||
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.4) 0%,
|
||||||
|
rgba(120, 192, 255, 0.3) 25%,
|
||||||
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
|
rgba(255, 140, 50, 0.3) 75%,
|
||||||
|
rgba(255, 122, 69, 0.4) 100%
|
||||||
|
);
|
||||||
|
animation: gradient-flow 20s ease-in-out infinite;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modern-gradient::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: radial-gradient(
|
||||||
|
circle at 30% 70%,
|
||||||
|
rgba(64, 169, 255, 0.5) 0%,
|
||||||
|
transparent 50%
|
||||||
|
), radial-gradient(
|
||||||
|
circle at 70% 30%,
|
||||||
|
rgba(255, 140, 50, 0.4) 0%,
|
||||||
|
transparent 50%
|
||||||
|
);
|
||||||
|
animation: pulse-effect 15s ease-in-out infinite alternate;
|
||||||
|
border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes gradient-flow {
|
||||||
|
0%, 100% {
|
||||||
|
transform: rotate(0deg) scale(1);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: rotate(90deg) scale(1.1);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: rotate(180deg) scale(0.9);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: rotate(270deg) scale(1.05);
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse-effect {
|
||||||
|
0% {
|
||||||
|
transform: scale(1) rotate(0deg);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2) rotate(180deg);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1) rotate(360deg);
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 主样式 */
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -6,9 +105,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
|
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||||
line-height: 1.6;
|
color: #333;
|
||||||
color: #2c3e50;
|
background-color: #f8f9fa;
|
||||||
|
position: relative;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
@@ -16,468 +116,280 @@ body {
|
|||||||
.container {
|
.container {
|
||||||
max-width: 1200px;
|
max-width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 20px;
|
padding: 24px;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
background-color: rgba(255, 255, 255, 0.9);
|
||||||
|
border-radius: 16px;
|
||||||
/* 头部样式 */
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
|
||||||
.header {
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 40px;
|
|
||||||
padding: 40px 20px;
|
|
||||||
background: rgba(255, 255, 255, 0.9);
|
|
||||||
border-radius: 20px;
|
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
box-shadow: 0 8px 32px rgba(76, 175, 80, 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
header {
|
||||||
font-size: 2.5rem;
|
text-align: center;
|
||||||
font-weight: 700;
|
margin-bottom: 28px;
|
||||||
background: linear-gradient(135deg, #4CAF50, #81C784);
|
padding-bottom: 20px;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
background: linear-gradient(135deg, #4096ff, #ff7a45);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
background-clip: text;
|
background-clip: text;
|
||||||
margin-bottom: 10px;
|
color: transparent;
|
||||||
animation: titleGlow 3s ease-in-out infinite alternate;
|
margin-bottom: 14px;
|
||||||
|
font-size: 2.4rem;
|
||||||
|
font-weight: 700;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes titleGlow {
|
.update-time {
|
||||||
from { filter: drop-shadow(0 0 5px rgba(76, 175, 80, 0.3)); }
|
|
||||||
to { filter: drop-shadow(0 0 15px rgba(76, 175, 80, 0.6)); }
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle {
|
|
||||||
font-size: 1.1rem;
|
|
||||||
color: #666;
|
color: #666;
|
||||||
opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 榜单信息样式 */
|
|
||||||
.rank-info {
|
|
||||||
background: rgba(255, 255, 255, 0.95);
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 25px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
box-shadow: 0 6px 25px rgba(76, 175, 80, 0.1);
|
|
||||||
border: 1px solid rgba(76, 175, 80, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-header {
|
|
||||||
display: flex;
|
|
||||||
gap: 20px;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-cover {
|
|
||||||
width: 120px;
|
|
||||||
height: 120px;
|
|
||||||
border-radius: 12px;
|
|
||||||
object-fit: cover;
|
|
||||||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-details {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-name {
|
|
||||||
font-size: 1.8rem;
|
|
||||||
color: #2c3e50;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-description {
|
|
||||||
color: #666;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rank-meta {
|
|
||||||
display: flex;
|
|
||||||
gap: 20px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-time, .update-frequency {
|
|
||||||
background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 20px;
|
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: #2E7D32;
|
background-color: rgba(0, 0, 0, 0.03);
|
||||||
border: 1px solid rgba(76, 175, 80, 0.3);
|
padding: 8px 16px;
|
||||||
|
border-radius: 24px;
|
||||||
|
display: inline-block;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 控制区域样式 */
|
.hot-list {
|
||||||
.controls {
|
list-style: none;
|
||||||
background: rgba(255, 255, 255, 0.9);
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 25px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
box-shadow: 0 6px 25px rgba(76, 175, 80, 0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group {
|
.hot-item {
|
||||||
|
padding: 20px;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: white;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||||
|
transition: all 0.3s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 15px;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
border: 1px solid rgba(0, 0, 0, 0.03);
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group label {
|
.hot-item:hover {
|
||||||
font-weight: 600;
|
transform: translateY(-3px);
|
||||||
color: #2c3e50;
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
|
||||||
min-width: 80px;
|
border-color: rgba(64, 169, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
#rankId {
|
.hot-rank {
|
||||||
flex: 1;
|
font-size: 1.2rem;
|
||||||
min-width: 200px;
|
font-weight: bold;
|
||||||
padding: 12px 16px;
|
color: #4096ff;
|
||||||
border: 2px solid #E0E0E0;
|
margin-right: 18px;
|
||||||
border-radius: 10px;
|
min-width: 38px;
|
||||||
font-size: 1rem;
|
text-align: center;
|
||||||
transition: all 0.3s ease;
|
background-color: rgba(64, 169, 255, 0.1);
|
||||||
background: rgba(255, 255, 255, 0.9);
|
border-radius: 50%;
|
||||||
|
width: 38px;
|
||||||
|
height: 38px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#rankId:focus {
|
.hot-rank.top-1 {
|
||||||
outline: none;
|
background: linear-gradient(135deg, #ff4d4f, #ff7a45);
|
||||||
border-color: #4CAF50;
|
|
||||||
box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.load-btn {
|
|
||||||
padding: 12px 24px;
|
|
||||||
background: linear-gradient(135deg, #4CAF50, #66BB6A);
|
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
|
||||||
border-radius: 10px;
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.load-btn:hover {
|
.hot-rank.top-2 {
|
||||||
transform: translateY(-2px);
|
background: linear-gradient(135deg, #ff7a45, #ffa940);
|
||||||
box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load-btn:active {
|
.hot-rank.top-3 {
|
||||||
transform: translateY(0);
|
background: linear-gradient(135deg, #ffa940, #ffec3d);
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.load-btn:disabled {
|
.hot-content {
|
||||||
opacity: 0.6;
|
flex: 1;
|
||||||
cursor: not-allowed;
|
}
|
||||||
transform: none;
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 1.15rem;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #333;
|
||||||
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title:hover {
|
||||||
|
color: #4096ff;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 加载动画 */
|
|
||||||
.loading {
|
.loading {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
background: rgba(255, 255, 255, 0.9);
|
color: #666;
|
||||||
border-radius: 15px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.spinner {
|
|
||||||
width: 40px;
|
|
||||||
height: 40px;
|
|
||||||
border: 4px solid #E0E0E0;
|
|
||||||
border-top: 4px solid #4CAF50;
|
|
||||||
border-radius: 50%;
|
|
||||||
animation: spin 1s linear infinite;
|
|
||||||
margin: 0 auto 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
0% { transform: rotate(0deg); }
|
|
||||||
100% { transform: rotate(360deg); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 错误提示 */
|
|
||||||
.error {
|
|
||||||
text-align: center;
|
|
||||||
padding: 30px;
|
|
||||||
background: rgba(255, 245, 245, 0.95);
|
|
||||||
border: 2px solid #ffcdd2;
|
|
||||||
border-radius: 15px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-icon {
|
|
||||||
font-size: 3rem;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.error-message {
|
|
||||||
color: #c62828;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.retry-btn {
|
footer {
|
||||||
padding: 10px 20px;
|
|
||||||
background: #f44336;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.retry-btn:hover {
|
|
||||||
background: #d32f2f;
|
|
||||||
transform: translateY(-1px);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 歌曲列表样式 */
|
|
||||||
.song-list {
|
|
||||||
background: rgba(255, 255, 255, 0.95);
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 25px;
|
|
||||||
margin-bottom: 30px;
|
|
||||||
box-shadow: 0 6px 25px rgba(76, 175, 80, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 25px;
|
|
||||||
padding-bottom: 15px;
|
|
||||||
border-bottom: 2px solid #E8F5E8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-header h3 {
|
|
||||||
font-size: 1.5rem;
|
|
||||||
color: #2c3e50;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-count {
|
|
||||||
background: linear-gradient(135deg, #4CAF50, #66BB6A);
|
|
||||||
color: white;
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 20px;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 歌曲项样式 */
|
|
||||||
.song-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
padding: 15px;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
background: rgba(248, 255, 248, 0.8);
|
|
||||||
border-radius: 12px;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
border: 1px solid rgba(76, 175, 80, 0.1);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-item:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
|
|
||||||
background: rgba(232, 245, 232, 0.9);
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-rank {
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: 700;
|
|
||||||
color: #4CAF50;
|
|
||||||
min-width: 40px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
margin-top: 30px;
|
||||||
|
padding-top: 20px;
|
||||||
.song-rank.top3 {
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
||||||
background: linear-gradient(135deg, #FFD700, #FFA000);
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
background-clip: text;
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-info {
|
|
||||||
flex: 1;
|
|
||||||
margin-left: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-title {
|
|
||||||
font-size: 1.1rem;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #2c3e50;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-line-clamp: 1;
|
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-artist {
|
|
||||||
color: #666;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-album {
|
|
||||||
color: #888;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-meta {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: flex-end;
|
|
||||||
gap: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.song-duration {
|
|
||||||
color: #666;
|
color: #666;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.song-popularity {
|
/* 音符装饰样式 */
|
||||||
background: linear-gradient(135deg, #4CAF50, #66BB6A);
|
.music-note {
|
||||||
color: white;
|
position: fixed;
|
||||||
padding: 3px 8px;
|
font-size: 24px;
|
||||||
border-radius: 12px;
|
color: rgba(236, 65, 65, 0.6);
|
||||||
font-size: 0.8rem;
|
z-index: 0;
|
||||||
font-weight: 600;
|
pointer-events: none;
|
||||||
|
animation: floatNote 20s linear infinite;
|
||||||
|
text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 返回按钮 */
|
@keyframes floatNote {
|
||||||
.back-to-list {
|
0% {
|
||||||
text-align: center;
|
transform: translateY(0) rotate(0deg);
|
||||||
margin: 30px 0;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
50% {
|
||||||
.back-btn {
|
transform: translateY(-100px) rotate(180deg);
|
||||||
display: inline-flex;
|
opacity: 0.9;
|
||||||
align-items: center;
|
}
|
||||||
gap: 8px;
|
100% {
|
||||||
padding: 12px 24px;
|
transform: translateY(-200px) rotate(360deg);
|
||||||
background: linear-gradient(135deg, #81C784, #A5D6A7);
|
opacity: 0;
|
||||||
color: white;
|
}
|
||||||
text-decoration: none;
|
|
||||||
border-radius: 10px;
|
|
||||||
font-weight: 600;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
box-shadow: 0 4px 15px rgba(129, 199, 132, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.back-btn:hover {
|
|
||||||
transform: translateY(-2px);
|
|
||||||
box-shadow: 0 6px 20px rgba(129, 199, 132, 0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 页脚 */
|
|
||||||
.footer {
|
|
||||||
text-align: center;
|
|
||||||
padding: 30px 20px;
|
|
||||||
background: rgba(255, 255, 255, 0.9);
|
|
||||||
border-radius: 15px;
|
|
||||||
margin-top: 40px;
|
|
||||||
color: #666;
|
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 响应式设计 */
|
/* 响应式设计 */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 1024px) and (min-width: 768px) {
|
||||||
.container {
|
.container {
|
||||||
padding: 15px;
|
max-width: 90%;
|
||||||
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
header h1 {
|
||||||
font-size: 2rem;
|
font-size: 2.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-header {
|
.hot-item {
|
||||||
flex-direction: column;
|
padding: 18px;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-cover {
|
.hot-title {
|
||||||
width: 100px;
|
font-size: 1.1rem;
|
||||||
height: 100px;
|
|
||||||
margin: 0 auto 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group {
|
.music-note {
|
||||||
flex-direction: column;
|
font-size: 22px;
|
||||||
align-items: stretch;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
body {
|
||||||
|
background-color: #f8f9fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group label {
|
.container {
|
||||||
min-width: auto;
|
max-width: 95%;
|
||||||
margin-bottom: 5px;
|
margin: 12px auto;
|
||||||
|
padding: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#rankId {
|
header {
|
||||||
min-width: auto;
|
margin-bottom: 20px;
|
||||||
|
padding-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size: 1.8rem;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.song-item {
|
.update-time {
|
||||||
flex-direction: column;
|
font-size: 0.85rem;
|
||||||
text-align: center;
|
padding: 6px 12px;
|
||||||
gap: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.song-info {
|
.hot-item {
|
||||||
margin-left: 0;
|
padding: 16px;
|
||||||
}
|
margin-bottom: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
.song-meta {
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-header {
|
.hot-rank {
|
||||||
flex-direction: column;
|
font-size: 1.1rem;
|
||||||
gap: 10px;
|
margin-right: 14px;
|
||||||
text-align: center;
|
min-width: 32px;
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 24px;
|
||||||
|
padding-top: 16px;
|
||||||
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.title {
|
.container {
|
||||||
font-size: 1.8rem;
|
margin: 8px auto;
|
||||||
|
padding: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
header h1 {
|
||||||
padding: 30px 15px;
|
font-size: 1.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rank-info, .controls, .song-list {
|
.hot-item {
|
||||||
padding: 20px;
|
padding: 14px;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.song-item {
|
.hot-rank {
|
||||||
padding: 12px;
|
font-size: 1rem;
|
||||||
|
margin-right: 12px;
|
||||||
|
min-width: 30px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hot-title {
|
||||||
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 平板端适配 */
|
/* 减少动画以节省电池 */
|
||||||
@media (min-width: 769px) and (max-width: 1024px) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
.container {
|
.modern-gradient,
|
||||||
padding: 25px;
|
.modern-gradient::before {
|
||||||
|
animation: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.song-item {
|
.modern-gradient {
|
||||||
padding: 18px;
|
background: linear-gradient(
|
||||||
}
|
135deg,
|
||||||
|
rgba(64, 169, 255, 0.3) 0%,
|
||||||
.rank-cover {
|
rgba(255, 175, 64, 0.2) 50%,
|
||||||
width: 110px;
|
rgba(255, 122, 69, 0.25) 100%
|
||||||
height: 110px;
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,15 +3,20 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>网易云榜单详情</title>
|
<title>网易云音乐榜单详情</title>
|
||||||
<link rel="stylesheet" href="css/style.css">
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<link rel="stylesheet" href="css/loading.css">
|
||||||
<link rel="stylesheet" href="css/background.css">
|
<link rel="stylesheet" href="css/background.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<!-- 音符装饰 -->
|
||||||
|
<div id="musicNotes"></div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header class="header">
|
<header class="header">
|
||||||
<h1 class="title">🎵 网易云榜单详情</h1>
|
<h1 class="title">🎵 网易云榜单详情</h1>
|
||||||
<p class="subtitle">发现音乐的魅力</p>
|
<p class="subtitle">发现音乐的魅力</p>
|
||||||
|
<a href="../网易云榜单列表/index.html" class="back-link" id="backLink">← 返回榜单列表</a>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="rank-info" id="rankInfo" style="display: none;">
|
<div class="rank-info" id="rankInfo" style="display: none;">
|
||||||
@@ -56,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="back-to-list">
|
<div class="back-to-list">
|
||||||
<a href="../网易云榜单列表/index.html" class="back-btn">← 返回榜单列表</a>
|
<a href="../网易云榜单列表/index.html" class="back-btn" id="backBtnBottom">← 返回榜单列表</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -64,6 +69,42 @@
|
|||||||
<p>© 2025 网易云榜单详情 - 数据来源于官方API</p>
|
<p>© 2025 网易云榜单详情 - 数据来源于官方API</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// 创建音符装饰
|
||||||
|
function createMusicNotes() {
|
||||||
|
const musicNotes = document.getElementById('musicNotes');
|
||||||
|
const noteSymbols = ['♪', '♫', '♬', '♩', '♭', '♮', '♯'];
|
||||||
|
const containerWidth = window.innerWidth;
|
||||||
|
const containerHeight = window.innerHeight;
|
||||||
|
|
||||||
|
// 创建20个音符
|
||||||
|
for (let i = 0; i < 20; i++) {
|
||||||
|
const note = document.createElement('div');
|
||||||
|
note.className = 'music-note';
|
||||||
|
note.textContent = noteSymbols[Math.floor(Math.random() * noteSymbols.length)];
|
||||||
|
|
||||||
|
// 随机位置
|
||||||
|
const left = Math.random() * containerWidth;
|
||||||
|
const top = Math.random() * containerHeight;
|
||||||
|
|
||||||
|
// 随机动画延迟
|
||||||
|
const delay = Math.random() * 15;
|
||||||
|
const duration = 10 + Math.random() * 20;
|
||||||
|
|
||||||
|
note.style.left = `${left}px`;
|
||||||
|
note.style.top = `${top}px`;
|
||||||
|
note.style.animationDelay = `${delay}s`;
|
||||||
|
note.style.animationDuration = `${duration}s`;
|
||||||
|
|
||||||
|
musicNotes.appendChild(note);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 页面加载完成后创建音符
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
createMusicNotes();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
<script src="js/script.js"></script>
|
<script src="js/script.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -31,11 +31,28 @@ class NeteaseMusicRankDetail {
|
|||||||
console.error('加载API接口失败:', error);
|
console.error('加载API接口失败:', error);
|
||||||
// 使用默认接口
|
// 使用默认接口
|
||||||
this.apiUrls = [
|
this.apiUrls = [
|
||||||
'https://60s-cf.viki.moe',
|
|
||||||
'https://60s.viki.moe',
|
'https://60s.viki.moe',
|
||||||
|
'https://60s-cf.viki.moe',
|
||||||
'https://60s.b23.run',
|
'https://60s.b23.run',
|
||||||
'https://60s.114128.xyz',
|
'https://60s.114128.xyz',
|
||||||
'https://60s-cf.114128.xyz'
|
'https://60s-cf.114128.xyz',
|
||||||
|
'https://60s.api.shumengya.top',
|
||||||
|
'https://api.03c3.cn/api/zb',
|
||||||
|
'https://api.vvhan.com/api/60s'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 确保至少有一个API接口
|
||||||
|
if (!this.apiUrls || this.apiUrls.length === 0) {
|
||||||
|
this.apiUrls = [
|
||||||
|
'https://60s.viki.moe',
|
||||||
|
'https://60s-cf.viki.moe',
|
||||||
|
'https://60s.b23.run',
|
||||||
|
'https://60s.114128.xyz',
|
||||||
|
'https://60s-cf.114128.xyz',
|
||||||
|
'https://60s.api.shumengya.top',
|
||||||
|
'https://api.03c3.cn/api/zb',
|
||||||
|
'https://api.vvhan.com/api/60s'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,6 +62,8 @@ class NeteaseMusicRankDetail {
|
|||||||
const loadBtn = document.getElementById('loadBtn');
|
const loadBtn = document.getElementById('loadBtn');
|
||||||
const rankIdInput = document.getElementById('rankId');
|
const rankIdInput = document.getElementById('rankId');
|
||||||
const retryBtn = document.getElementById('retryBtn');
|
const retryBtn = document.getElementById('retryBtn');
|
||||||
|
const backLink = document.getElementById('backLink');
|
||||||
|
const backBtnBottom = document.getElementById('backBtnBottom');
|
||||||
|
|
||||||
loadBtn.addEventListener('click', () => this.loadRankDetail());
|
loadBtn.addEventListener('click', () => this.loadRankDetail());
|
||||||
retryBtn.addEventListener('click', () => this.loadRankDetail());
|
retryBtn.addEventListener('click', () => this.loadRankDetail());
|
||||||
@@ -61,6 +80,19 @@ class NeteaseMusicRankDetail {
|
|||||||
const value = e.target.value.trim();
|
const value = e.target.value.trim();
|
||||||
loadBtn.disabled = !value || !/^\d+$/.test(value);
|
loadBtn.disabled = !value || !/^\d+$/.test(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 处理返回链接
|
||||||
|
if (backLink) {
|
||||||
|
backLink.addEventListener('click', (e) => {
|
||||||
|
console.log('返回榜单列表');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (backBtnBottom) {
|
||||||
|
backBtnBottom.addEventListener('click', (e) => {
|
||||||
|
console.log('返回榜单列表');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查URL参数
|
// 检查URL参数
|
||||||
@@ -102,12 +134,17 @@ class NeteaseMusicRankDetail {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await this.fetchRankDetail(rankId);
|
const data = await this.fetchRankDetail(rankId);
|
||||||
|
this.rankData = data;
|
||||||
this.displayRankDetail(data);
|
this.displayRankDetail(data);
|
||||||
this.hideLoading();
|
this.hideLoading();
|
||||||
|
|
||||||
// 更新URL
|
// 更新URL
|
||||||
const newUrl = new URL(window.location);
|
const newUrl = new URL(window.location);
|
||||||
newUrl.searchParams.set('id', rankId);
|
newUrl.searchParams.set('id', rankId);
|
||||||
|
if (data.playlist && data.playlist.name) {
|
||||||
|
newUrl.searchParams.set('name', encodeURIComponent(data.playlist.name));
|
||||||
|
document.title = `${data.playlist.name} - 网易云榜单详情`;
|
||||||
|
}
|
||||||
window.history.replaceState({}, '', newUrl);
|
window.history.replaceState({}, '', newUrl);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -120,22 +157,43 @@ class NeteaseMusicRankDetail {
|
|||||||
// 获取榜单详情数据
|
// 获取榜单详情数据
|
||||||
async fetchRankDetail(rankId) {
|
async fetchRankDetail(rankId) {
|
||||||
let lastError = null;
|
let lastError = null;
|
||||||
|
let attemptedApis = 0;
|
||||||
|
|
||||||
for (let i = 0; i < this.apiUrls.length; i++) {
|
// 尝试所有API接口
|
||||||
|
while (attemptedApis < this.apiUrls.length) {
|
||||||
try {
|
try {
|
||||||
const apiUrl = this.apiUrls[this.currentApiIndex];
|
const apiUrl = this.apiUrls[this.currentApiIndex];
|
||||||
const url = `${apiUrl}/v2/ncm-rank/${rankId}`;
|
let url = `${apiUrl}/v2/ncm-rank/${rankId}`;
|
||||||
|
|
||||||
console.log(`尝试API ${this.currentApiIndex + 1}:`, url);
|
// 处理本地JSON文件
|
||||||
|
if (apiUrl.includes('返回接口.json')) {
|
||||||
|
url = apiUrl;
|
||||||
|
console.log('使用本地测试数据:', url);
|
||||||
|
}
|
||||||
|
// 针对不同API接口格式进行适配
|
||||||
|
else if (apiUrl.includes('03c3.cn') || apiUrl.includes('vvhan.com')) {
|
||||||
|
// 这些API可能有不同的路径格式,需要特殊处理
|
||||||
|
if (apiUrl.includes('03c3.cn')) {
|
||||||
|
url = `${apiUrl}/ncm/playlist?id=${rankId}`;
|
||||||
|
} else if (apiUrl.includes('vvhan.com')) {
|
||||||
|
url = `${apiUrl}/music/netease/playlist?id=${rankId}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`尝试API ${this.currentApiIndex + 1}/${this.apiUrls.length}:`, url);
|
||||||
|
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
const timeoutId = setTimeout(() => controller.abort(), 10000);
|
const timeoutId = setTimeout(() => controller.abort(), 8000); // 缩短超时时间
|
||||||
|
|
||||||
const response = await fetch(url, {
|
const response = await fetch(url, {
|
||||||
signal: controller.signal,
|
signal: controller.signal,
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
}
|
},
|
||||||
|
// 添加缓存控制
|
||||||
|
cache: 'no-cache',
|
||||||
|
// 添加模式
|
||||||
|
mode: apiUrl.includes('返回接口.json') ? 'same-origin' : 'cors'
|
||||||
});
|
});
|
||||||
|
|
||||||
clearTimeout(timeoutId);
|
clearTimeout(timeoutId);
|
||||||
@@ -146,8 +204,25 @@ class NeteaseMusicRankDetail {
|
|||||||
|
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
if (data.code !== 200) {
|
// 如果是本地测试数据,直接使用
|
||||||
throw new Error(data.message || '获取数据失败');
|
if (apiUrl.includes('返回接口.json')) {
|
||||||
|
// 查找对应ID的榜单
|
||||||
|
if (data.data && Array.isArray(data.data)) {
|
||||||
|
const rank = data.data.find(item => item.id == rankId);
|
||||||
|
if (rank) {
|
||||||
|
// 构造一个符合详情页面期望的数据结构
|
||||||
|
return {
|
||||||
|
code: 200,
|
||||||
|
playlist: rank,
|
||||||
|
data: [] // 模拟空歌曲列表
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 不同API可能有不同的成功状态码
|
||||||
|
if (data.code !== undefined && data.code !== 200 && data.code !== 0) {
|
||||||
|
throw new Error(data.message || data.msg || '获取数据失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('API调用成功:', data);
|
console.log('API调用成功:', data);
|
||||||
@@ -157,23 +232,68 @@ class NeteaseMusicRankDetail {
|
|||||||
console.warn(`API ${this.currentApiIndex + 1} 失败:`, error.message);
|
console.warn(`API ${this.currentApiIndex + 1} 失败:`, error.message);
|
||||||
lastError = error;
|
lastError = error;
|
||||||
this.currentApiIndex = (this.currentApiIndex + 1) % this.apiUrls.length;
|
this.currentApiIndex = (this.currentApiIndex + 1) % this.apiUrls.length;
|
||||||
|
attemptedApis++;
|
||||||
|
|
||||||
if (error.name === 'AbortError') {
|
if (error.name === 'AbortError') {
|
||||||
lastError = new Error('请求超时,请重试');
|
lastError = new Error('请求超时,请重试');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 添加短暂延迟,避免过快请求下一个API
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 300));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw lastError || new Error('所有API接口都无法访问');
|
throw lastError || new Error('所有API接口都无法访问,请稍后再试');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示榜单详情
|
// 显示榜单详情
|
||||||
displayRankDetail(data) {
|
displayRankDetail(data) {
|
||||||
this.rankData = data;
|
this.rankData = data;
|
||||||
const songs = data.data || [];
|
|
||||||
|
// 适配不同API返回的数据格式
|
||||||
|
let songs = [];
|
||||||
|
let rankInfo = null;
|
||||||
|
|
||||||
|
// 标准格式:data.data 是数组
|
||||||
|
if (data.data && Array.isArray(data.data)) {
|
||||||
|
songs = data.data;
|
||||||
|
rankInfo = data.playlist || {};
|
||||||
|
}
|
||||||
|
// 03c3.cn API格式:data.result 或 data.playlist
|
||||||
|
else if (data.result) {
|
||||||
|
if (data.result.tracks && Array.isArray(data.result.tracks)) {
|
||||||
|
songs = data.result.tracks;
|
||||||
|
rankInfo = data.result;
|
||||||
|
} else if (Array.isArray(data.result)) {
|
||||||
|
songs = data.result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// vvhan.com API格式:data.playlist 和 data.playlist.tracks
|
||||||
|
else if (data.playlist && data.playlist.tracks) {
|
||||||
|
songs = data.playlist.tracks;
|
||||||
|
rankInfo = data.playlist;
|
||||||
|
}
|
||||||
|
// 其他可能的格式
|
||||||
|
else {
|
||||||
|
// 尝试查找数据中的任何数组
|
||||||
|
for (const key in data) {
|
||||||
|
if (Array.isArray(data[key]) && data[key].length > 0) {
|
||||||
|
songs = data[key];
|
||||||
|
break;
|
||||||
|
} else if (data[key] && data[key].tracks && Array.isArray(data[key].tracks)) {
|
||||||
|
songs = data[key].tracks;
|
||||||
|
rankInfo = data[key];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (songs.length === 0) {
|
||||||
|
throw new Error('未找到歌曲数据或数据格式不兼容');
|
||||||
|
}
|
||||||
|
|
||||||
// 显示榜单信息(如果有的话)
|
// 显示榜单信息(如果有的话)
|
||||||
this.displayRankInfo(songs[0]);
|
this.displayRankInfo(songs[0], rankInfo);
|
||||||
|
|
||||||
// 显示歌曲列表
|
// 显示歌曲列表
|
||||||
this.displaySongList(songs);
|
this.displaySongList(songs);
|
||||||
@@ -184,25 +304,63 @@ class NeteaseMusicRankDetail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 显示榜单信息
|
// 显示榜单信息
|
||||||
displayRankInfo(firstSong) {
|
displayRankInfo(firstSong, rankInfoData) {
|
||||||
const rankInfo = document.getElementById('rankInfo');
|
const rankInfoElement = document.getElementById('rankInfo');
|
||||||
|
|
||||||
if (firstSong && firstSong.rank_name) {
|
// 获取URL参数中的榜单名称
|
||||||
document.getElementById('rankName').textContent = firstSong.rank_name;
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
document.getElementById('rankDescription').textContent = `${firstSong.rank_name} - 网易云音乐官方榜单`;
|
const rankNameFromUrl = urlParams.get('name');
|
||||||
|
|
||||||
|
// 尝试从多个来源获取榜单名称
|
||||||
|
let rankName = rankNameFromUrl || '';
|
||||||
|
if (!rankName) {
|
||||||
|
if (rankInfoData && rankInfoData.name) {
|
||||||
|
rankName = rankInfoData.name;
|
||||||
|
} else if (firstSong) {
|
||||||
|
rankName = firstSong.rank_name || firstSong.rankName || firstSong.playlist_name || '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rankName) {
|
||||||
|
document.getElementById('rankName').textContent = rankName;
|
||||||
|
document.getElementById('rankDescription').textContent = `${rankName} - 网易云音乐官方榜单`;
|
||||||
|
document.title = `${rankName} - 网易云音乐榜单详情`;
|
||||||
|
|
||||||
// 如果有专辑封面,使用第一首歌的专辑封面作为榜单封面
|
// 尝试获取榜单封面
|
||||||
if (firstSong.album && firstSong.album.cover) {
|
let coverUrl = '';
|
||||||
document.getElementById('rankCover').src = firstSong.album.cover;
|
if (rankInfoData && rankInfoData.coverImgUrl) {
|
||||||
document.getElementById('rankCover').alt = firstSong.rank_name;
|
coverUrl = rankInfoData.coverImgUrl;
|
||||||
|
} else if (rankInfoData && rankInfoData.picUrl) {
|
||||||
|
coverUrl = rankInfoData.picUrl;
|
||||||
|
} else if (firstSong && firstSong.album && firstSong.album.cover) {
|
||||||
|
coverUrl = firstSong.album.cover;
|
||||||
|
} else if (firstSong && firstSong.album && firstSong.album.picUrl) {
|
||||||
|
coverUrl = firstSong.album.picUrl;
|
||||||
|
} else if (firstSong && firstSong.al && firstSong.al.picUrl) {
|
||||||
|
coverUrl = firstSong.al.picUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('updateTime').textContent = `更新时间: ${this.formatDate(new Date())}`;
|
if (coverUrl) {
|
||||||
document.getElementById('updateFrequency').textContent = '实时更新';
|
document.getElementById('rankCover').src = coverUrl;
|
||||||
|
document.getElementById('rankCover').alt = rankName;
|
||||||
|
}
|
||||||
|
|
||||||
rankInfo.style.display = 'block';
|
// 尝试获取更新时间
|
||||||
|
let updateTime = '';
|
||||||
|
if (rankInfoData && rankInfoData.updateTime) {
|
||||||
|
updateTime = this.formatDate(new Date(rankInfoData.updateTime));
|
||||||
|
} else if (rankInfoData && rankInfoData.updateFrequency) {
|
||||||
|
updateTime = rankInfoData.updateFrequency;
|
||||||
|
} else {
|
||||||
|
updateTime = this.formatDate(new Date());
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementById('updateTime').textContent = `更新时间: ${updateTime}`;
|
||||||
|
document.getElementById('updateFrequency').textContent = rankInfoData?.updateFrequency || '定期更新';
|
||||||
|
|
||||||
|
rankInfoElement.style.display = 'block';
|
||||||
} else {
|
} else {
|
||||||
rankInfo.style.display = 'none';
|
rankInfoElement.style.display = 'none';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
[
|
[
|
||||||
"https://60s.api.shumengya.top"
|
"https://60s.api.shumengya.top",
|
||||||
|
"../返回接口.json"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user