老师,辛苦检查

来源:2-21 自由编程

Lanny_Chung

2022-03-16 11:59:41

<!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 auto;
        }
        div{
            width: 88px;
            height: 81px;
            background: url('xin.png') no-repeat center center;
        }
        body>div{
            position: relative;
            margin-top: 200px;
        }
        div>div{
            position: absolute;
            left:0;
            top:0;
            animation: sports 1s linear infinite;
        }
        @keyframes sports{
            from{
                opacity: 1;
                transform: scale(1);
            }
            to{
                opacity: 0;
                transform: scale(2);
            }
        }
    </style>
</head>
<body>
    <div>
        <div></div>
    </div>
</body>
</html>


写回答

1回答

好帮手慕星星

2022-03-16

同学你好,代码实现效果很棒。继续加油,祝学习愉快!

0

0 学习 · 17877 问题

查看课程