确定当不使用CSS面对屏幕时元素是否应该可见
要确定在不面向屏幕时某个元素是否应可见,请使用backface-visibility属性:
示例
<!DOCTYPE html>
<html>
<head>
<style>
.demo1 {
position: relative;
width: 150px;
height: 150px;
background-color: yellow;
perspective: 80px;
margin: 50px;
perspective-origin: left;
transform: rotateY(180deg);
}
.demo2 {
position: absolute;
padding: 20px;
background-color: orange;
transform-style: preserve-3d;
transform: rotateX(45deg);
backface-visibility: visible;
}
</style>
</head>
<body>
<h1>Rotation</h1>
<div class = "demo1">Demo
<div class = "demo2">Demo</div>
</div>
</body>
</html>热门推荐
3 初八祝福语简短语
10 写给老师祝福语简短大学
11 女朋友考试祝福语简短
12 初六开工祝福语简短
13 新年给妹妹祝福语简短
14 简短霸气的考试祝福语
15 老公开业祝福语简短
16 男朋友祝福语简短新年
17 祝球员赛前祝福语简短
18 浪漫的生日祝福语简短