写了3D旋转属性和空间移动属性,没有空间移动的效果
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
p{
width: 200px;
height: 200px;
background-color: orange;
}
.box1{
width: 202px;
height: 202px;
border: 1px solid black;
margin: 50px auto;
perspective: 300px;
}
.box1 p{
transform: rotateX(30deg) translateX(100px) translateY(200PX);
}
</style>
</head>
<body>
<div class="box1">
<p></p>
</div>
</body>
</html>
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星