From b19c6415297a203e5bf3961927b97a8300725b94 Mon Sep 17 00:00:00 2001 From: KQL Date: Wed, 3 Sep 2025 10:04:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E7=9A=84ClassRank=E7=BB=84=E4=BB=B6CSS=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ClassRank/index.css | 233 +++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 src/components/ClassRank/index.css diff --git a/src/components/ClassRank/index.css b/src/components/ClassRank/index.css new file mode 100644 index 0000000..1381c35 --- /dev/null +++ b/src/components/ClassRank/index.css @@ -0,0 +1,233 @@ +.class-rank { + width: 100%; + height: 100%; + padding: 20px; + background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%); + border-radius: 12px; + backdrop-filter: blur(10px); +} + +.class-rank-header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 24px; + padding-bottom: 16px; + border-bottom: 1px solid rgba(255, 255, 255, 0.1); +} + +.class-rank-title { + font-size: 20px; + font-weight: 600; + color: #ffffff; + display: flex; + align-items: center; + gap: 8px; +} + +.class-rank-subtitle { + font-size: 14px; + color: rgba(255, 255, 255, 0.6); +} + +.class-rank-content { + display: flex; + flex-direction: column; + gap: 16px; +} + +.class-rank-list { + display: flex; + flex-direction: column; + gap: 12px; +} + +.class-rank-item { + display: flex; + align-items: center; + padding: 12px; + background: rgba(255, 255, 255, 0.05); + border-radius: 8px; + transition: all 0.3s ease; + cursor: pointer; +} + +.class-rank-item:hover { + background: rgba(255, 255, 255, 0.1); + transform: translateX(4px); +} + +.class-rank-item.item1 { + background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 100%); + border: 1px solid rgba(255, 215, 0, 0.3); +} + +.class-rank-item.item2 { + background: linear-gradient(135deg, rgba(192, 192, 192, 0.2) 0%, rgba(192, 192, 192, 0.05) 100%); + border: 1px solid rgba(192, 192, 192, 0.3); +} + +.class-rank-item.item3 { + background: linear-gradient(135deg, rgba(205, 127, 50, 0.2) 0%, rgba(205, 127, 50, 0.05) 100%); + border: 1px solid rgba(205, 127, 50, 0.3); +} + +.class-rank-position { + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + font-size: 16px; + font-weight: bold; + color: #ffffff; + margin-right: 12px; +} + +.class-rank-position.icon1 { + background: url('../../assets/images/Rank/first_icon.png') no-repeat center; + background-size: contain; + color: transparent; +} + +.class-rank-position.icon2 { + background: url('../../assets/images/Rank/second_icon.png') no-repeat center; + background-size: contain; + color: transparent; +} + +.class-rank-position.icon3 { + background: url('../../assets/images/Rank/third_icon.png') no-repeat center; + background-size: contain; + color: transparent; +} + +.class-rank-avatar { + margin-right: 12px; +} + +.class-rank-info { + flex: 1; + display: flex; + flex-direction: column; + gap: 4px; +} + +.class-rank-name { + font-size: 14px; + font-weight: 500; + color: #ffffff; +} + +.class-rank-class { + font-size: 12px; + color: rgba(255, 255, 255, 0.6); +} + +.class-rank-score { + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 4px; +} + +.class-rank-points { + font-size: 18px; + font-weight: bold; + color: #3491fa; +} + +.class-rank-label { + font-size: 12px; + color: rgba(255, 255, 255, 0.6); +} + +.class-rank-loading { + display: flex; + align-items: center; + justify-content: center; + height: 200px; +} + +.class-rank-empty { + display: flex; + align-items: center; + justify-content: center; + height: 200px; +} + +/* 动画效果 */ +@keyframes slideIn { + from { + opacity: 0; + transform: translateX(-20px); + } + to { + opacity: 1; + transform: translateX(0); + } +} + +.class-rank-item { + animation: slideIn 0.5s ease forwards; +} + +.class-rank-item:nth-child(1) { + animation-delay: 0.1s; +} + +.class-rank-item:nth-child(2) { + animation-delay: 0.2s; +} + +.class-rank-item:nth-child(3) { + animation-delay: 0.3s; +} + +.class-rank-item:nth-child(4) { + animation-delay: 0.4s; +} + +.class-rank-item:nth-child(5) { + animation-delay: 0.5s; +} + +/* 响应式设计 */ +@media (max-width: 768px) { + .class-rank { + padding: 16px; + } + + .class-rank-title { + font-size: 18px; + } + + .class-rank-item { + padding: 10px; + } + + .class-rank-position { + width: 28px; + height: 28px; + font-size: 14px; + } + + .class-rank-points { + font-size: 16px; + } +} + +/* 暗色主题适配 */ +@media (prefers-color-scheme: dark) { + .class-rank { + background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.2) 100%); + } + + .class-rank-item { + background: rgba(0, 0, 0, 0.2); + } + + .class-rank-item:hover { + background: rgba(0, 0, 0, 0.3); + } +} \ No newline at end of file