老师帮忙检查一下作业谢谢!

来源:2-14 编程练习

寿限无的丸子

2022-03-01 01:55:00

<!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:first-child{
        top:0;
        background-color:pink;
        transform:rotateX(85deg) translateZ(-10px);
    }
    .box p:nth-child(2){
        top:50px;
        background-color:green;
        transform:rotateX(94deg) translateZ(-10px);
    }
    .box p:last-child{
        top:100px;
        background-color:blue;
        transform:rotateX(103deg) translateZ(-10px);
    }
</style>
</head>
<body>
<div class="box">
    <p></p>
    <p></p>
    <p></p>
</div>
</body>
</html>


写回答

1回答

好帮手慕慕子

2022-03-01

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

0

0 学习 · 17877 问题

查看课程