请老师检查
来源:2-14 编程练习
Erick1029
2022-01-26 13:44:44
相关代码:
<!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; } /* 补充代码 */ .box p:nth-child(1){ background-color: red; transform: rotateX(68deg) translateZ(90px); } .box p:nth-child(2){ background-color: greenyellow; transform: rotateX(73deg) translateZ(60px); } .box p:nth-child(3){ background-color: blue; transform: rotateX(78deg) translateZ(30px); } </style> </head> <body> <div class="box"> <p></p> <p></p> <p></p> </div> </body>
1回答
好帮手慕小李
2022-01-26
同学你好,代码可以实现需求,棒棒的!继续努力。祝学习愉快。
相似问题