<style>
::-webkit-scrollbar {
/*滚动条整体样式*/
width : 5px; /*高宽分别对应横竖滚动条的尺寸*/
height: 5px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius : 10px;
background-color: #dcdcdc;
}
::-webkit-scrollbar-track {
/*滚动条里面轨道*/
background: #f7f7f7;
border-radius: 2px;
}
</style>
<div class="scrollbar" style="height: 100px;width: 100px;overflow: auto;">
<div style="height: 200px;width: 400px;">内容区</div>
</div>