大家好,最近项目里用到美化浏览器滚动条样式,我也总结一下,分析给大家,挺好用的哦
::-webkit-scrollbar {
width: 14px;
height: 14px;
}
::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
border-radius: 999px;
border: 5px solid transparent;
}
::-webkit-scrollbar-track {
box-shadow: 1px 1px 5px rgba(0, 0, 0, .2) inset;
}
::-webkit-scrollbar-thumb {
min-height: 20px;
background-clip: content-box;
box-shadow: 0 0 0 5px rgba(0, 0, 0, .2) inset;
}
::-webkit-scrollbar-corner {
background: transparent;
}
时间: 2024-10-11 12:18:49