CSS透视图起源属性
使用Perspective-origin属性指定3D元素的底部位置。
您可以尝试运行以下代码来实现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 周末祝福语正能量简短
14 祖国生日祝福语简短英文
15 老爸生日暴富祝福语简短
16 男朋友新年祝福语简短
17 给姐妹乔迁祝福语简短
18 中考祝福语简短卡片大全