::-webkit-scrollbar {
-webkit-appearance: none;
width: 6px;
height: 6px;
background-color: transparent;
scrollbar-width: thin;
}
::-webkit-scrollbar-thumb {
cursor: pointer;
border-radius: 5px;
transition: color 0.2s ease;
}
/*定义滑块
内阴影+圆角*/
/* 鼠标hover的时候才显示滚动条 */
:hover::-webkit-scrollbar-thumb {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1);
background-color: rgba(0, 0, 0, 0.1);
}
PC端自定义滚动条
最新推荐文章于 2024-01-11 15:47:54 发布