html代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test</title>
<style type="text/css">
.innerbox{
overflow-y: auto;
background-color: #f8f8f8;
height: 200px;
padding: 10px;
}
.innerbox::-webkit-scrollbar {
width: 50px;
height: 50px;
scrollbar-arrow-color:red;
}
.innerbox::-webkit-scrollbar-thumb {
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
background: rgba(0,0,0,0.2);
scrollbar-arrow-color:red;
}
.innerbox::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
border-radius: 0;
background: rgba(0,0,0,0.1);
}
</style>
</head>
<body>
<div class="innerbox" style="width:600px;height:600px;overflow-y:auto">
<div class="content" style="width:900px;height:300px;">这是第一行</div>
<div class="content" style="width:900px;height:300px;">这是第二行</div>
<div class="content" style="width:900px;height:300px;">这是第三行</div>
</div>
</body>
</html>
效果
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/998f1b9b15d4fe1d5eee5b454b1971cc.png)