<!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;
}
/* 补充代码 */
p:first-child{
background-color: red;
transform: rotateX(80deg) translateZ(20px);
}
p:nth-child(2){
background-color: rgb(7, 247, 7);
transform: rotateX(-80deg) translateZ(80px);
}
p:nth-child(3){
background-color: rgba(11, 34, 241, 0.788);
transform: rotateX(-68deg) translateZ(140px);
}
</style>
</head>
<body>
<div class="box">
<p></p>
<p></p>
<p></p>
</div>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星