2-21 自由编程作业提交
来源:2-21 自由编程
我在浪费钱
2021-09-04 10:07:19
<!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>
.box1 {
width: 88px;
height: 81px;
margin: 10% auto;
position: relative;
}
.box2 {
position: absolute;
top: 0px;
animation: heart 1s linear 0s infinite;
}
@keyframes heart {
form {
transform: scale(1);
opacity: 1;
}
to {
transform: scale(2);
opacity: 0;
}
}
</style>
</head>
<body>
<div class="box1">
<img src="img/xin.png" alt="">
<div class="box2">
<img src="img/xin.png" alt="">
</div>
</div>
</body>
</html>
1回答
同学你好,代码实现效果很棒。继续加油,祝学习愉快!
相似问题