Skip to content

Commit 49df07f

Browse files
committed
fix:scrollbar
1 parent 93ead92 commit 49df07f

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

chat2db-client/src/styles/global.less

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,36 @@ input:-webkit-autofill {
2626
caret-color: var(--color-text) !important; // 光标的颜色
2727
}
2828

29-
::-webkit-scrollbar {
30-
width: 6px;
31-
height: 6px;
32-
}
33-
34-
::-webkit-scrollbar-thumb {
35-
background-color: var(--color-fill);
36-
border-radius: 2px;
37-
}
29+
* {
30+
::-webkit-scrollbar {
31+
cursor: pointer;
32+
width: 4px;
33+
height: 4px;
34+
background-color: transparent;
35+
}
3836

39-
::-webkit-scrollbar-button {
40-
width: 0;
41-
height: 0;
42-
background: transparent;
43-
}
37+
::-webkit-scrollbar-thumb {
38+
cursor: pointer;
39+
background-color: transparent;
40+
border-radius: 2px;
41+
// transition: background-color 500ms ${token.motionEaseOut};
4442

45-
::-webkit-scrollbar-track {
46-
background: transparent;
47-
width: 0px;
48-
cursor: pointer;
49-
}
43+
&:hover {
44+
background-color: var(--color-text);
45+
}
46+
}
5047

51-
::-webkit-scrollbar-corner {
52-
background: transparent;
53-
}
48+
::-webkit-scrollbar-corner {
49+
display: none;
50+
width: 0;
51+
height: 0;
52+
}
5453

55-
* {
56-
scrollbar-width: 4px; // 宽度:auto(默认),thin(窄),none(隐藏)
57-
scrollbar-color: var(--color-fill) transparent; // 颜色:第一个颜色是滑块颜色,第二个颜色是轨道颜色
54+
&:hover {
55+
::-webkit-scrollbar-thumb {
56+
background-color: var(--color-fill);
57+
}
58+
}
5859
}
5960

6061
html,

0 commit comments

Comments
 (0)