div块
<div class="box">
<div class="box1">
<img src="img/1.jpg" alt="" >
<img src="img/2.111.jpg" alt="" >
<img src="img/3.jpg" alt="" >
第四张为防止图片有间隙,所以放第一张
<img src="img/1.jpg" alt="">
</div>
style样式
<style>
.box{
width:536px;
height: 356px;
overflow: hidden;
position: relative;
font-size: 0;
}
.box1{
width:2144px;
height: 356px;
position: absolute;
animation:move 5s linear infinite;
}
.box:hover{
animation-play-state: paused;
}
@keyframes move{
0%{left:0px;}
100%{left:-1608px;}
}
</style>