::-webkit-scrollbar-track {
background-color: red;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
<!--修改 滑块 -->
::-webkit-scrollbar-thumb {
background-color: #191919;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
::前面不添加名字修改的是整个网页的滚动条
需要修改单个的时候
需要修改的class名字或id::-webkit-scrollbar-track {
background-color: red;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
<!--修改 滑块 -->
需要修改的class名字或id::-webkit-scrollbar-thumb {
background-color: #191919;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}