如何使用CSS指定3D元素的底部位置
要指定3D元素的底部位置,请使用Perspective-origin属性。
您可以尝试运行以下代码来实现Perspective-origin属性:
示例
<!DOCTYPE html>
<html>
<head>
<style>
.demo1 {
position: relative;
width: 150px;
height: 150px;
background-color: yellow;
perspective: 80px;
margin: 50px;
perspective-origin: left;
}
.demo2 {
position: absolute;
padding: 20px;
background-color: orange;
transform-style: preserve-3d;
transform: rotateX(45deg);
}
</style>
</head>
<body>
<h1>Rotation</h1>
<div class="demo1">Demo
<div class="demo2">Demo
</div>
</div>
</body>
</html>热门推荐
10 舅舅大婚文案祝福语简短
11 對好友毕业祝福语简短
12 简短佛教新年祝福语大全
13 儿子31岁祝福语简短
14 项目总生日祝福语简短
15 朋友弟弟生日祝福语简短
16 生日祝福语短句简短霸气
17 对别人新年祝福语简短
18 简短有内涵的祝福语