Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
}
img {
	display:block;
}
ul {
	list-style:none;
}
#content {
	margin:auto;
	width:500px;
	height:300px;
	overflow:hidden;
}
ul {
	position:relative;
}
li {
	position:absolute;
	top:0;
	left:-500px;
}
@keyframes lunbo1 {
	0% {
	transform:translate(0,0);
}
25% {
	transform:translate(500px,0);
}
50% {
	transform:translate(1000px,0);
}
100% {
	transform:translate(1500px,0);
}
}@keyframes lunbo2 {
	0% {
	transform:translate(0,0);
}
25% {
	transform:translate(500px,0);
}
50% {
	transform:translate(1000px,0);
}
100% {
	transform:translate(1500px,0);
}
}li:nth-child(1) {
	animation:lunbo1 16s infinite;
}
li:nth-child(2) {
	animation:lunbo2 16s 4s infinite;
}
li:nth-child(3) {
	animation:lunbo2 16s 8s infinite;
}
li:nth-child(4) {
	animation:lunbo2 16s 12s infinite;
}

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

纯HTML,css简易轮播展示

更新时间:2020-06-29 08:48:16

0