前端 页面自定义滚动条

时光总嘲笑我的痴心妄想 提交于 2019-11-27 18:58:58

示例

代码

<div class="p-detail__table-scrollbar">
    <div style="width: 3300px;height: 10px;">
    </div>
</div>

<style>
.p-detail__table-scrollbar{
    overflow-x: scroll;
    overflow-y: hidden;
}
.p-detail__table-scrollbar::-webkit-scrollbar{
    width:1px;
    height: 10px;
    background-color: #ccc;
    border-radius: 5px;
}
.p-detail__table-scrollbar::-webkit-scrollbar-track{
    border-radius: 5px;
}
.p-detail__table-scrollbar::-webkit-scrollbar-thumb{
    border-radius: 5px;
    background-color: #333;
}
</style>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!