css自定义滚动条

.container {
width: 200px;
height: 150px;
overflow: auto; /* 自动显示滚动条 /
-ms-overflow-style: scrollbar; /
在IE上显示自定义滚动条 */
}

/* 自定义滚动条的样式 */
.container::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.container::-webkit-scrollbar-track {
background-color: #f2f2f2;
}
.container::-webkit-scrollbar-thumb {
background-color: #888;
border-radius: 5px;
}
.container::-webkit-scrollbar-thumb:hover {
background-color: #555;
}

posted on   IT丶Hatcher  阅读(29)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
点击右上角即可分享
微信分享提示