请老师检查

来源:2-12 编程练习

陈淑雯

2022-03-25 11:59:28

相关代码:

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

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

0

0 学习 · 15276 问题

查看课程