如何指定如何查看3D元素的透视图
使用CSS透视图属性可以指定如何查看3D元素的透视图。
您可以尝试运行以下代码来实现此目的
例
<!DOCTYPE html>
<html>
<head>
<style>
.demo1 {
position: relative;
width: 150px;
height: 150px;
background-color: yellow;
perspective: 80px;
margin: 50px;
}
.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 大学报道祝福语简短