2-21编程练习
来源:2-21 自由编程
weixin_慕的地2217823
2022-10-19 20:25:48
<!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; } div{ width: 88px; height: 81px; background-image: url(images1/xin.png); margin: 100px auto; } .box1{ position: relative; } .box2{ position: absolute; top:-100px; left:0; opacity: 0; animation: xindong 1s linear 0s infinite; } @keyframes xindong{ from{ opacity: 1; transform: scale(1); } to{ opacity: 0; transform: scale(2); } } </style> </head> <body> <div class="box1"> <div class="box2"></div> </div> </body> </html>
1回答
好帮手慕星星
2022-10-20
同学你好,代码实现效果很棒。继续加油,祝学习愉快!
相似问题