老师,检查下作业
来源:2-14 编程练习
慕莱坞5245545
2021-09-06 18:35:50
<!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:pink;
transform:rotateX(-95deg) translateZ(0px);
}
.box p:nth-child(2){
background-color:green;
transform:rotateX(-90deg) translateZ(50px);
}
.box p:nth-child(3){
background-color:blue;
transform:rotateX(-80deg) translateZ(100px);
}
</style>
</head>
<body>
<div class="box">
<p></p>
<p></p>
<p></p>
</div>
</body>
</html>
1回答
好帮手慕然然
2021-09-07
同学你好,代码实现很正确,继续加油,祝学习愉快!
相似问题