请老师检查

来源:2-14 编程练习

慕UI4313976

2021-03-06 16:20:44

<!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: rgba(241, 97, 97, 0.795);
transform: rotatex(71deg) translateZ(77px);
}
.box p:nth-child(2){
background-color: rgba(151, 243, 133, 0.795);
transform: rotatex(74deg) translateZ(49px);
}
.box p:nth-child(3){
background-color: rgba(196, 111, 230, 0.795);
transform: rotatex(80deg) translateZ(13px);
}
</style>
</head>
<body>
<div class="box">
<p></p>
<p></p>
<p></p>
</div>
</body>
</html>


写回答

1回答

好帮手慕星星

2021-03-06

同学你好,代码实现效果可以。继续加油,祝学习愉快!

0

0 学习 · 15276 问题

查看课程

相似问题

请老师检查

回答 1

请老师检查

回答 1

请老师检查

回答 1

请老师检查

回答 1

请老师检查

回答 1