100 lines
2.4 KiB
CSS
100 lines
2.4 KiB
CSS
/* 定义滚动条整体样式 */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 6px;
|
|
}
|
|
|
|
/* 定义滚动条轨道样式 */
|
|
::-webkit-scrollbar-track {
|
|
/* 使用内阴影模拟轨道样式 */
|
|
/*-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.3) inset;*/
|
|
/* 注释掉的背景颜色,可根据需求启用 */
|
|
/* background-color: #F5F5F5; */
|
|
}
|
|
|
|
/* 定义滚动条滑块样式 */
|
|
::-webkit-scrollbar-thumb {
|
|
/* 滑块圆角 */
|
|
border-radius: 3px;
|
|
/* 移除默认的内阴影 */
|
|
-webkit-box-shadow: none !important;
|
|
/* 滑块默认背景颜色 */
|
|
background-color: #90A2B9 !important;
|
|
/* 移除默认的背景图像 */
|
|
background-image: none !important;
|
|
}
|
|
|
|
/* 定义滚动条滑块悬停时的样式 */
|
|
::-webkit-scrollbar-thumb:hover {
|
|
/* 悬停时滑块背景颜色 */
|
|
background-color: #45556C !important;
|
|
}
|
|
|
|
/* 定义文本选中时的样式,适用于 Mozilla 内核浏览器 */
|
|
::-moz-selection {
|
|
/* 选中背景透明 */
|
|
background: transparent;
|
|
/* 选中文字颜色 */
|
|
color: #E2E8F1;
|
|
}
|
|
|
|
/* 深色主题自定义滚动条样式 */
|
|
.custom-scrollbar::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-track {
|
|
background: rgba(31, 41, 55, 0.3); /* 深色轨道背景 */
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-thumb {
|
|
background: rgba(75, 85, 99, 0.8); /* 深色滑块 */
|
|
border-radius: 4px;
|
|
border: 1px solid rgba(55, 65, 81, 0.5);
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(107, 114, 128, 0.9); /* 悬停时更亮的滑块 */
|
|
}
|
|
|
|
.custom-scrollbar::-webkit-scrollbar-corner {
|
|
background: rgba(31, 41, 55, 0.3); /* 角落背景 */
|
|
}
|
|
|
|
/* Tailwind 暗黑模式(class)全局滚动条与选中样式 */
|
|
.dark ::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
.dark ::-webkit-scrollbar-track {
|
|
background: rgba(31, 41, 55, 0.3);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.dark ::-webkit-scrollbar-thumb {
|
|
background: rgba(75, 85, 99, 0.8) !important;
|
|
border-radius: 4px;
|
|
border: 1px solid rgba(55, 65, 81, 0.5);
|
|
}
|
|
|
|
.dark ::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(107, 114, 128, 0.9) !important;
|
|
}
|
|
|
|
.dark ::-webkit-scrollbar-corner {
|
|
background: rgba(31, 41, 55, 0.3);
|
|
}
|
|
|
|
.dark ::selection {
|
|
background: rgba(99, 102, 241, 0.35);
|
|
color: #E5E7EB;
|
|
}
|
|
|
|
.dark ::-moz-selection {
|
|
background: rgba(99, 102, 241, 0.35);
|
|
color: #E5E7EB;
|
|
}
|