From 6a6cc9e1c5e70dfc65b1b427a3b2e43fff583dfc Mon Sep 17 00:00:00 2001 From: bridge Date: Sat, 22 Nov 2025 15:33:56 +0800 Subject: [PATCH] refactor web code --- .../game/panels/info/InfoPanelContainer.vue | 18 ------------- web/src/style.css | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/web/src/components/game/panels/info/InfoPanelContainer.vue b/web/src/components/game/panels/info/InfoPanelContainer.vue index 34769a3..3123926 100644 --- a/web/src/components/game/panels/info/InfoPanelContainer.vue +++ b/web/src/components/game/panels/info/InfoPanelContainer.vue @@ -199,24 +199,6 @@ onUnmounted(() => { color: #ff7875; } -/* Scrollbar Styling */ -.panel-body::-webkit-scrollbar { - width: 6px; -} - -.panel-body::-webkit-scrollbar-track { - background: rgba(0, 0, 0, 0.1); - border-radius: 3px; -} - -.panel-body::-webkit-scrollbar-thumb { - background: #444; - border-radius: 3px; -} - -.panel-body::-webkit-scrollbar-thumb:hover { - background: #555; -} /* Legacy */ .legacy-list { diff --git a/web/src/style.css b/web/src/style.css index 9ac1a15..7844037 100644 --- a/web/src/style.css +++ b/web/src/style.css @@ -42,3 +42,30 @@ a { color: inherit; text-decoration: none; } + +/* Global Scrollbar Styling */ +::-webkit-scrollbar { + width: 6px; + height: 6px; + background-color: transparent; /* 关键:修复白色背景问题 */ +} + +::-webkit-scrollbar-track { + background: rgba(255, 255, 255, 0.05); + border-radius: 3px; +} + +::-webkit-scrollbar-thumb { + background: #444; + border-radius: 3px; +} + +::-webkit-scrollbar-thumb:hover { + background: #666; +} + +/* 修复 Firefox 的滚动条 */ +* { + scrollbar-width: thin; + scrollbar-color: #444 transparent; +}