Html
    Css
    Js

    
                        
 * {
	margin:0;
	padding:0;
	list-style:none;
	float:left
}
#content {
	width:1000px;
	height:300px;
	position:relative;
	overflow:hidden
}
#content ul {
	width:1000px;
	height:300px;
	position:absolute
}
#content ul li {
	width:200px;
	height:300px;
}
#content ul li:nth-of-type(1) {
	background:yellow
}
#content ul li:nth-of-type(2) {
	background:turquoise
}
#content ul li:nth-of-type(3) {
	background:navajowhite
}
#content ul li:nth-of-type(4) {
	background:darkblue
}
#content ul li:nth-of-type(5) {
	background:black
}
#content ul li:nth-of-type(6) {
	background:yellow
}
#content ul li:nth-of-type(7) {
	background:turquoise
}
#content ul li:nth-of-type(8) {
	background:navajowhite
}
#content ul li:nth-of-type(9) {
	background:darkblue
}
#content ul li:nth-of-type(10) {
	background:black
}

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

js实现无缝滚动

0