麻烦老师检查一下

来源:2-12 编程练习

qq_慕慕0057983

2022-03-22 09:25:40

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            width: 200px;
            height: 200px;
            margin: 40px auto;
            perspective: 500px;
            position: relative;
        }

        .box img {
            width: 200px;
            height: 200px;
            border: 1px solid #000;
            border-radius: 50%;
        }

        .box img.dog {
            position: absolute;
            top: 0;
            left: 0;
            transition: transform 1s ease 0s;
            /* 在此添加代码 */
            transform-origin:0 100%;
        }

        .box:hover img.dog {
            /* 在此添加代码 */
            transform:rotateX(-180deg);
        }
    </style>
</head>

<body>
    <div class="box">
        <img class="cat" src="http://climg.mukewang.com/5f87bfa208ca046706500650.jpg" alt="">
        <img class="dog" src="http://climg.mukewang.com/5f87c06b088e3a1000000000.jpg" alt="">
    </div>
</body>

</html>


写回答

1回答

好帮手慕久久

2022-03-22

同学你好,代码正确,很棒,祝学习愉快!

0

前端工程师

前端入门如同写字,如果你不知道从哪开始,那就选择前端(含Vue3.x,React17,TS)

20327 学习 · 17877 问题

查看课程