画质有点不清晰但效果大体是这样,知识点在上一个博客里,话不多说直接上代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
* {
margin: 0;
padding: 0;
}
#div01 {
width: 200px;
height: 300px;
border-radius: 20px 20px;
box-shadow: 15px 12px 8px #888;
margin-left: 100px;
margin-top: 100px;
position: absolute;
z-index: 1;
border: 1px solid slategray;
}
#div02 {
width: 200px;
height: 300px;
border-radius: 20px 20px;
box-shadow: 15px 12px 8px #595858;
margin-left: 10px;
position: absolute;
z-index: 2;
border: 1px solid slategray;
margin-top: 5px;
animation: my_an 5s;
}
#div03 {
width: 200px;
height: 300px;
border-radius: 20px 20px;
box-shadow: 15px 12px 8px #888;
margin-left: 10px;
margin-top: 5px;
position: absolute;
z-index: 3;
border: 1px solid slategray;
animation: my_an 5s;
}
#div04 {
width: 200px;
height: 300px;
border-radius: 20px 20px;
box-shadow: 15px 12px 8px #888;
margin-left: 10px;
margin-top: 5px;
position: absolute;
z-index: 4;
border: 1px solid slategray;
animation: my_an 5s;
}
img {
width: 200px;
height: 300px;
display: block;
border-radius: 20px 20px;
}
@keyframes my_an {
from {
transform: none;
}
to {
transform: translate(300px);
}
}
</style>
<body>
<div id="div01">
<div id="div02">
<div id="div03">
<div id="div04"><img src="img/07.jpg" alt=""></div>
<img src="img/03.jpg" alt="">
</div><img src="img/04.jpg" alt="">
</div>
<img src="img/05.jpg" alt="">
</div>
</body>
</html>