<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
section{
width: 300px;
height: 285px;
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
margin: auto;
}
section img{
position: absolute;
left: 0;
top: 0;
opacity: 0;
transform: scale(0);
}
section img:nth-child(1){
animation: my 8s linear infinite;
}
section img:nth-child(2){
animation: my 8s linear 1s infinite;
}
section img:nth-child(3){
animation: my 8s linear 2s infinite;
}
section img:nth-child(4){
animation: my 8s linear 3s infinite;
}
section img:nth-child(5){
animation: my 8s linear 4s infinite;
}
@keyframes my{
0%{
opacity: 0;
transform: scale(0)
}
25%{
opacity: 0.5;
transform: scale(1)
}
50%{
opacity: 1;
transform: scale(2)
}
75%{
opacity: 0.5;
transform: scale(3)
}
100%{
opacity: 0;
transform: scale(4)
}
}
</style>
</head>
<body>
<section>
<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="">
<!--
玫瑰花图片需要自己加,只有把 src="img/hua2.png" 的 img/hua2.png更换成自己的图片就好
-->
</section>
</body>
</html>
小效果,不断盛开的玫瑰
最新推荐文章于 2023-03-17 21:06:30 发布