老师,请检查

来源:2-14 编程练习

慕芸芸

2022-12-13 11:04:29

<!Doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>空间移动</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

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

        .box p {
            position: absolute;
            left: 0;
            top: 0;
            width: 200px;
            height: 200px;
        }

        .box p:first-child {
            background: red;
            transform: rotateX(75deg) translateZ(50px);
        }

        .box p:nth-child(2) {
            background: green;
            transform: rotateX(80deg);
        }

        .box p:last-child {
            background-color: blue;
            transform: rotateX(86deg) translateZ(-50px);
        }

        /* 补充代码 */
    </style>
</head>

<body>
    <div class="box">
        <p></p>
        <p></p>
        <p></p>
    </div>
</body>

</html>


写回答

1回答

imooc_慕慕

2022-12-13

同学你好,代码可以实现需求,很棒,祝学习愉快~

0

0 学习 · 17877 问题

查看课程