<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>dnf轮播图</title>
<style>
@keyframes move {
0% {left: 0}
24% {left: 0}
26% {left: -400px}
49% {left: -400px}
51% {left: -800px}
74% {left: -800px}
76% {left: -1200px}
98% {left: -1200px}
100% {left: -1600px}
}
* {
margin: 0;
padding: 0;
list-style: none;
}
.wrap {
width: 400px;
height: 300px;
background-color: hotpink;
position: relative;
overflow: hidden;
}
.move {
width: 2000px;
height: 300px;
background-color: orange;
position: absolute;
animation: move 16s linear infinite;
}
.move img {
float: left;
width: 400px;
height: 300px;
}
</style>
</head>
<body>
<div class="wrap">
<div class="move">
<img src="https://img0.baidu.com/it/u=1317345167,3263672675&fm=26&fmt=auto" alt="">
<img src="https://img0.baidu.com/it/u=3960377588,610015154&fm=26&fmt=auto" alt="">
<img src="https://img0.baidu.com/it/u=3705878594,1682381414&fm=26&fmt=auto" alt="">
<img src="https://img2.baidu.com/it/u=2358024181,3036462462&fm=26&fmt=auto" alt="">
<img src="https://img0.baidu.com/it/u=1317345167,3263672675&fm=26&fmt=auto" alt="">
</div>
</div>
</body>
</html>