11-CSS3的animation简易轮播图

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>图片轮换</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.app{
width: 710px;
height: 300px;
margin-top: 100px;
margin-left: 250px;
overflow: hidden;
}
.box{
width: 4000px;
position: relative;
animation: boxes 10s ease infinite normal;
}
@keyframes boxes{
0%{
left: 0;
}
25%{
left: -710px;
}
50%{
left: -1470px;
}
75%{
left: -2190px;
}

100%{
left: -2900px;
}
}
</style>
</head>
<body>
<div class="app">
<div class="box">
<img src="images/1.jpg">
<img src="images/2.jpg">
<img src="images/3.jpg">
<img src="images/4.jpg">
<img src="images/3.jpg">
</div>
</div>
</body>
</html>
posted @ 2019-06-25 22:18  池鱼奥耶  阅读(238)  评论(0编辑  收藏  举报