CSS透视图属性的用法
要指定有关如何查看3D元素的透视图,请使用CSS透视图属性。
您可以尝试运行以下代码以使用Perspective属性:
示例
<!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 横幅元旦祝福语大全简短