请老师看看

来源:2-14 编程练习

Livesinkon

2020-12-13 15:40:14

# 具体遇到的问题

# 报错信息的截图

# 相关课程内容截图

# 尝试过的解决思路和结果

# 粘贴全部相关代码,切记添加代码注释(请勿截图)

在这里输入

<!Doctype html>

<html>

<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:nth-child(1) {

        background-color:rgb(224, 83, 83);

        transform: rotateX(87deg) translateZ(-20px);

    }

    .box p:nth-child(2) {

        background-color:rgb(106, 211, 102);

        transform: rotateX(93deg) translateZ(-55px);

    }

    .box p:nth-child(3) {

        background-color:rgb(98, 96, 202);

        transform: rotateX(101deg) translateZ(-91px);

    }

</style>

</head>

<body>

<div class="box">

    <p></p>

    <p></p>

    <p></p>

</div>

</body>

</html>

   

代码,可通过选择【代码语言】突出显示

写回答

1回答

好帮手慕星星

2020-12-13

同学你好,代码实现效果很棒。继续加油,祝学习愉快!

0

0 学习 · 15276 问题

查看课程