HTML代码:
<div class="list" style="width:100%;height:100%;overflow-Y: scroll;overflow-x: hidden;">
<div>
css样式:
.map_estate_list::-webkit-scrollbar,
.search-keyword-box::-webkit-scrollbar {
width: 4px;
height: 4px;
background-color: #b3b3b3;
}
.map_estate_list::-webkit-scrollbar-thumb,
.search-keyword-box::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
background-color: #bbb;
}
.map_estate_list::-webkit-scrollbar-track,
.search-keyword-box::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 1px rgba(0, 0, 0, 0);
border-radius: 10px;
background-color: #fff;
}
效果图:
![图片名称](https://i-blog.csdnimg.cn/blog_migrate/285da9124b22c566c5d759b75b5cf60c.png#pic_center)