Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
d02e1db0
Commit
d02e1db0
authored
Jan 12, 2026
by
Edric Li
Browse files
style: 优化滚动条自动隐藏效果
- 默认隐藏滚动条,悬停时显示 - 支持 Webkit (Chrome/Safari/Edge) 和 Firefox - 滚动条样式与暗色主题适配
parent
0da51507
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/style.css
View file @
d02e1db0
...
...
@@ -19,7 +19,22 @@
@apply
min-h-screen;
}
/* 自定义滚动条 */
/* 自定义滚动条 - 默认隐藏,悬停或滚动时显示 */
*
{
scrollbar-width
:
thin
;
scrollbar-color
:
transparent
transparent
;
}
*
:hover
,
*
:focus-within
{
scrollbar-color
:
rgba
(
156
,
163
,
175
,
0.5
)
transparent
;
}
.dark
*
:hover
,
.dark
*
:focus-within
{
scrollbar-color
:
rgba
(
75
,
85
,
99
,
0.5
)
transparent
;
}
::-webkit-scrollbar
{
@apply
h-2
w-2;
}
...
...
@@ -29,10 +44,15 @@
}
::-webkit-scrollbar-thumb
{
@apply
rounded-full
bg-gray-300
dark
:
bg-dark-600
;
@apply
rounded-full
bg-transparent;
transition
:
background-color
0.2s
ease
;
}
*
:hover::-webkit-scrollbar-thumb
{
@apply
bg-gray-300/50
dark
:
bg-dark-600
/
50
;
}
::-webkit-scrollbar-thumb:hover
{
*
:hover
::-webkit-scrollbar-thumb:hover
{
@apply
bg-gray-400
dark
:
bg-dark-500
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment