<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.box{
width: 850px;
height: 550px;
border: 1px solid red;
margin: 50px auto;
background: url(img/1.webp) no-repeat center/100% 100%;
animation:luo 9s linear infinite;
}
@keyframes luo{
0,30%{
background: url(img/1.webp) no-repeat center/100% 100%;
}
35%,65%{
background: url(img/2.jpg) no-repeat center/100% 100%;
}
70%,100%{
background: url(img/3.webp) no-repeat center/100% 100%;
}
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
.box{
width: 850px;
height: 550px;
border: 1px solid red;
margin: 50px auto;
background: url(img/1.webp) no-repeat center/100% 100%;
animation:luo 9s linear infinite;
}
@keyframes luo{
0,30%{
background: url(img/1.webp) no-repeat center/100% 100%;
}
35%,65%{
background: url(img/2.jpg) no-repeat center/100% 100%;
}
70%,100%{
background: url(img/3.webp) no-repeat center/100% 100%;
}
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>