Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
}
#div1 {
	width:500px;
	height:20px;
	background:#eee;
	margin:50px auto 0;
	border-radius:10px;
	position:relative;
}
#div2 {
	width:100px;
	height:20px;
	background:#dd6e1e;
	border-radius:10px;
	position:absolute;
	left:0;
	top:0;
}
#div3 {
	width:500px;
	height:300px;
	border:1px #ddd solid;
	margin:30px auto 0;
	border-radius:10px;
	overflow:hidden;
	position:relative;
}
#div4 {
	position:absolute;
}
#div4 p {
	text-indent:1em;
	margin:10px;
	color:#666;
	font-size:14px;
}

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

自定义滚动条

0