请老师检查2-14代码
来源:2-14 编程练习
qq_慕仰20210716
2021-08-10 20:39:47
<!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 .p1 {
position: absolute;
left: 0;
top: 0;
width: 200px;
height: 200px;
background-color: rgba(118, 74, 204, 0.849);
transform: rotateX(80deg);
}
.box .p2 {
position: absolute;
left: 0;
top: 0;
width: 200px;
height: 200px;
background-color: rgb(123, 208, 241,.5);
transform: rotateX(73deg) translateZ(50px);
}
.box .p3 {
position: absolute;
left: 0;
top: 0;
width: 200px;
height: 200px;
background-color: rgb(247, 128, 247,.5);
transform: rotateX(89deg) translateZ(-50px);
}
</style>
</head>
<body>
<div class="box">
<p class="p1"></p>
<p class="p2"></p>
<p class="p3"></p>
</div>
</body>
</html>
1回答
同学你好,代码正确,很棒,祝学习愉快!
相似问题