<!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>Document</title>
<style>
*{
margin:0;
padding:0;
}
.box{
width: 285px;
height: 300px;
margin:240px auto;
position: relative;
font-size: 40px;
color: red;
text-align: center;
line-height: 300px;
}
.box p{
color: aqua;
}
.box img{
position: absolute;
left: 0;
top: 0;
transform: scale(0);
opacity: 0;
}
@keyframes move{
0%{
transform: scale(0);
opacity: 0;
}
25%{
transform: scale(1);
opacity: .5;
}
50%{
transform: scale(2);
opacity: 1;
}
75%{
transform: scale(3);
opacity: .5;
}
100%{
transform: scale(4);
opacity: 0;
}
}
.box img:nth-child(1){
animation: move 8s linear 0s infinite;
}
.box img:nth-child(2){
animation: move 8s linear 2s infinite;
}
.box img:nth-child(3){
animation: move 8s linear 4s infinite;
}
.box img:nth-child(4){
animation: move 8s linear 6s infinite;
}
.box img:nth-child(4){
animation: move 8s linear 8s infinite;
}
</style>
</head>
<body>
<div class="box">
<p>生日快乐</p>
<img src="img/hua2.png" alt="">
<img src="img/hua2.png" alt="">
<img src="img/hua2.png" alt="">
<img src="img/hua2.png" alt="">
<img src="img/hua2.png" alt="">
</div>
</body>
</html>