2-12编程练习

来源:2-12 编程练习

weixin_慕的地2217823

2022-10-19 18:10:41

<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:100% 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-10-19

同学你好,代码实现效果很棒!祝学习愉快~

0

0 学习 · 17877 问题

查看课程

相似问题