老师请检查

来源:2-14 编程练习

12332288

2022-08-01 01:30:36

相关代码:

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

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

    /* 补充代码 */
    .box p:first-child{
        background-color:red;
        transform:rotateX(80deg) translateZ(30px);
    }
    .box p:nth-child(2){
        background-color:green;
        transform:rotateX(83deg) translateZ(6px);
    }
    .box p:nth-child(3){
        background-color:blue;
        transform:rotateX(88deg) translateZ(-24px);
    }
</style>
</head>
<body>
<div class="box">
    <p></p>
    <p></p>
    <p></p>
</div>
</body>
</html>


写回答

1回答

好帮手慕慕子

2022-08-01

同学你好,代码实现是可以的,继续加油,祝学习愉快~

0

前端工程师

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

20327 学习 · 17877 问题

查看课程