Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
}
.box {
	width:300px;
	height:500px;
	border:1px solid #ccc;
	margin:100px;
	position:relative;
	overflow:hidden;
}
.content {
	padding:5px 18px 5px 5px;
	position:absolute;
	top:0;
	left:0;
	overflow:hidden;
}
.scroll {
	width:18px;
	height:100%;
	position:absolute;
	top:0;
	right:0;
	background-color:#eee;
}
.bar {
	width:100%;
	position:absolute;
	top:0;
	left:0;
	background-color:#09f;
	border-radius:10px;
	cursor:pointer;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

js自定义滚动条

更新时间:2020-04-22 20:39:43

0