2-14 编程练习
<!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:purple; transform:rotateX(70deg); } p:nth-child(2){ background-color:lightgreen; transform:rotateX(70deg) translateZ(60px); } p:last-child{ background-color:pink; transform:rotateX(70deg) translateZ(120px); } </style> </head> <body> <div class="box"> <p></p> <p></p> <p></p> </div> </body> </html>
老师,为什么不对?
7
收起
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星