Skip to content

Commit 3fb8751

Browse files
committed
perf: update thumb
1 parent 8c6d6b0 commit 3fb8751

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

frontend/src/styles/index.scss

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,36 @@ body {
55
padding: 0 !important;
66
}
77

8-
// 滚动条整体部分
8+
// 滚动条整体部分 — 默认较细,悬停时放大并高亮,便于点击
99
::-webkit-scrollbar {
1010
width: 6px;
1111
height: 6px;
12+
transition: width 0.15s ease;
13+
}
14+
15+
/* 当用户把鼠标移到页面或特定可滚动区域时放大滚动条,便于交互 */
16+
body:hover ::-webkit-scrollbar,
17+
.data-view:hover ::-webkit-scrollbar,
18+
.hot-table:hover ::-webkit-scrollbar,
19+
.wtHolder:hover ::-webkit-scrollbar {
20+
width: 10px;
21+
height: 10px;
1222
}
1323

1424
::-webkit-scrollbar-thumb {
15-
border-radius: 5px;
25+
border-radius: 6px;
1626
background-color: rgba(144, 147, 153, 0.3);
27+
border: 2px solid transparent; /* 防止放大时内容溢出视觉问题 */
28+
background-clip: padding-box;
29+
transition: background-color 0.15s ease, transform 0.12s ease;
30+
}
31+
32+
/* 鼠标悬停或按下时更显眼 */
33+
::-webkit-scrollbar-thumb:hover,
34+
::-webkit-scrollbar-thumb:active {
35+
background-color: rgba(144, 147, 153, 0.6);
36+
transform: scale(1.08);
37+
box-shadow: inset 0 0 0 3px rgba(0,0,0,0.12);
1738
}
1839

1940
::-webkit-scrollbar-track {

0 commit comments

Comments
 (0)