diff --git a/web/src/pages/Home.module.less b/web/src/pages/Home.module.less index 5741a3e..4133de5 100644 --- a/web/src/pages/Home.module.less +++ b/web/src/pages/Home.module.less @@ -473,12 +473,12 @@ } .rankingSwitch { - display: flex; + display: inline-flex; background: #f5f5f5; border-radius: 20px; padding: 4px; margin-bottom: 16px; - width: fit-content; + position: relative; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); } @@ -493,16 +493,13 @@ color: #666; transition: all 0.3s ease; position: relative; - z-index: 1; + z-index: 2; + min-width: 80px; + text-align: center; &:hover { color: #333; } - - &.active { - color: #fff; - font-weight: 600; - } } .rankingSwitchSlider { @@ -514,6 +511,7 @@ border-radius: 16px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3); + z-index: 1; } .rankingCard { diff --git a/web/src/pages/Home.tsx b/web/src/pages/Home.tsx index 496aae0..8719bd9 100644 --- a/web/src/pages/Home.tsx +++ b/web/src/pages/Home.tsx @@ -693,7 +693,7 @@ const Home: React.FC = () => { <TrophyOutlined /> 排行榜 -
+
switchRankingType('daily')}