Skip to content

Commit

Permalink
fix:scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
shanhexi committed Mar 21, 2024
1 parent 93ead92 commit 49df07f
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions chat2db-client/src/styles/global.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,36 @@ input:-webkit-autofill {
caret-color: var(--color-text) !important; // 光标的颜色
}

::-webkit-scrollbar {
width: 6px;
height: 6px;
}

::-webkit-scrollbar-thumb {
background-color: var(--color-fill);
border-radius: 2px;
}
* {
::-webkit-scrollbar {
cursor: pointer;
width: 4px;
height: 4px;
background-color: transparent;
}

::-webkit-scrollbar-button {
width: 0;
height: 0;
background: transparent;
}
::-webkit-scrollbar-thumb {
cursor: pointer;
background-color: transparent;
border-radius: 2px;
// transition: background-color 500ms ${token.motionEaseOut};

::-webkit-scrollbar-track {
background: transparent;
width: 0px;
cursor: pointer;
}
&:hover {
background-color: var(--color-text);
}
}

::-webkit-scrollbar-corner {
background: transparent;
}
::-webkit-scrollbar-corner {
display: none;
width: 0;
height: 0;
}

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

html,
Expand Down

0 comments on commit 49df07f

Please sign in to comment.