请老师检查作业

来源:2-21 自由编程

鱼档卖鱼

2021-12-14 15:28:28

<!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;

        }


        .box1,

        .box2 {

            width: 300px;

            height: 300px;

            background-image: url(images/xin.png);

            background-size: 300px 300px;

        }

        .box1 {

            position: relative;

            margin: 150px auto;

        }


        .box1 .box2 {

            position: absolute;

            left: 0;

            top: 0;

            animation: ax 1s linear 0s infinite;

        }


        @keyframes ax {

            from {

                transform: scale(1);

                opacity: 1;

            }


            to {

                transform: scale(2.2);

                opacity: 0;

            }

        }

    </style>

</head>


<body>

    <div class="box1">

        <div class="box2"></div>

    </div>

</body>


</html>


写回答

1回答

好帮手慕小李

2021-12-14

同学你好,代码能实现效果,棒棒的。继续努力~

祝学习愉快。

0

0 学习 · 17877 问题

查看课程