请老师检查
来源:2-14 编程练习
闪电打雷躲树下
2022-08-30 16:24:47
<!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;
perspective: 300px;
}
.box p {
position: absolute;
left: 0;
top: 0;
width: 200px;
height: 200px;
}
/* 补充代码 */
p:first-child{
transform: rotateX(68deg) translateZ(60px);
background-color: brown;
}
p:nth-child(2){
transform: rotateX(80deg);
background-color:rgb(40, 218, 40) ;
}
p:nth-child(3){
transform: rotateX(87deg) translateZ(-60px);
background-color: rgb(58, 41, 193);
}
</style>
</head>
<body>
<div class="box">
<p></p>
<p></p>
<p></p>
</div>
</body>
</html>1回答
同学你好,代码可以实现需求很棒,继续努力!祝学习愉快!
相似问题