效果图
![在这里插入图片描述](https://img-blog.csdnimg.cn/5bcb9ec2101246dd8a887bcd92828e7a.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA55ak55eV5L2T,size_20,color_FFFFFF,t_70,g_se,x_16)
代码
table {
display: block;
overflow-x: hidden;
overflow-y: auto;
height: 480px;
border: 1px solid red !important;
}
table::-webkit-scrollbar {
width: 6px;
height: 80px !important;
}
table::-webkit-scrollbar-thumb {
background-color: #2c98ff;
border-radius: 5px;
height: 80px;
}
table::-webkit-scrollbar-track {
background-color: #030c22;
height: 80px;
}
table::-webkit-scrollbar-thumb:hover {
background-color: #2c98ff;
height: 80px;
}
table::-webkit-scrollbar-thumb:active {
background-color: #2c98ff;
height: 80px;
}
参考1