-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlisa_test_preserve-3d-issue.html
85 lines (69 loc) · 1.85 KB
/
lisa_test_preserve-3d-issue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
<style>
.flip-container {
perspective: 1000px;
}
.flip-container:hover .flipper, .flip-container.hover .flipper {
animation: 10.5s ease-out flip;;
}
.flip-container, .front, .back {
width: 320px;
height: 480px;
}
.flipper {
transition: 10.6s;
transform-style: preserve-3d;
transform-origin: right center;
position: relative;
}
.front, .back {
backface-visibility: hidden;
position: absolute;
top: 0;
left: 0;
}
.front {
z-index: 2;
/* for firefox 31 */
transform: rotateY(0deg);
background-color: red;
}
.back {
transform: rotateY(180deg);
background-color: pink;
}
@keyframes flip {
from {
transform: translateX(0) rotateY(0);
}
to {
transform: translateX(-100%) rotateY(-180deg);
}
}
</style>
</head>
<body>
<div class="flip-container">
<div class="flipper">
<div class="front">
I am front
</div>
<div class="back">
I am back
</div>
</div>
</div>
<div>
<h1>问题: IE11中,parent上翻转的时候backface-visibility :hidden 依然可以看到front的面的mirror版本</h1>
<p>原因:IE11 及以下版本不支持 preserve-3d, Edge 已经支持。 </p>
<p>解决方案: 请查看<a href="lisa_test_preserve-3d-solution.html">例子</a></p>
</div>
<script>
</script>
</body>
</html>