css3 实现轮播

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CSS3实现无缝轮播-jq22.com</title>
<script src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<style>
* {
	padding:0;
	margin:0;
	list-style:none;
}
.banner {
	width:640px;
	height:300px;
	overflow:hidden;
	margin:0 auto;
}
.inner {
	width:9999px;
	position:relative;
	animation:aaa 16s infinite 2s running;
}
@keyframes aaa {
	0% {
	transform:translateX(0px);
}
5% {
	transform:translateX(-640px);
}
25% {
	transform:translateX(-640px);
}
30% {
	transform:translateX(-1280px);
}
50% {
	transform:translateX(-1280px);
}
55% {
	transform:translateX(-1920px);
}
75% {
	transform:translateX(-1920px);
}
80% {
	transform:translateX(-2560px);
}
100% {
	transform:translateX(-2560px);
}
}.inner:hover {
	animation-play-state:paused;
	cursor:pointer;
}
.innerwrapper {
	float:left;
	width:640px;
}
.banner img {
	width:640px;
	height:300px;
}
</style>
</head>
<body>
<div class="banner">
    <div class="inner">
        <div class="innerwrapper"><img src="http://www.jq22.com/img/cs/500x500-1.png" alt="banner1"></div>
        <div class="innerwrapper"><img src="http://www.jq22.com/img/cs/500x300-1.png" alt="banner2"></div>
        <div class="innerwrapper"><img src="http://www.jq22.com/img/cs/300x500-1.png" alt="banner3"></div>
        <div class="innerwrapper"><img src="http://www.jq22.com/img/cs/500x500-2.png" alt="banner4"></div>
        <div class="innerwrapper"><img src="http://www.jq22.com/img/cs/500x500-1.png" alt="banner1"></div>
    </div>
</div>

<script>

</script>

</body>
</html>

  

css3 实现轮播

上一篇:传统方式上传文件


下一篇:PHP中一些常用的安全类函数