老师请检查
来源:2-14 编程练习
阿惹
2021-12-07 21:12:46
<!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:nth-child(1){
background-color: yellow;
transform: rotatex(69deg) translateZ(72px);
}
.box p:nth-child(2){
background-color: rgb(0, 255, 42);
transform: rotatex(68deg) translateZ(97px);
/* top: 200px; */
}
.box p:nth-child(3){
background-color: rgb(17, 0, 255);
transform: rotatex(70deg) translateZ(120px);
}
/* 补充代码 */
</style>
</head>
<body>
<div class="box">
<p></p>
<p></p>
<p></p>
</div>
</body>
</html>
搜索
复制
1回答
同学你好,可以再调整下旋转角度,看着更符合效果一些。参考:
祝学习愉快!
相似问题