forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomposited.html
42 lines (38 loc) · 844 Bytes
/
composited.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<style>
* {
box-sizing: border-box;
}
.container {
width: 200px;
height: 200px;
border: 1px solid black;
}
.box {
width: 100px;
height: 100px;
background-color: blue;
}
body.changed .box.disappear {
display: none;
}
.composited {
transform: translateZ(0);
}
</style>
<script>
function applyChange()
{
document.body.classList.add('changed');
}
</script>
</head>
<body>
<div class="container composited">
<div class="composited disappear box">box</div>
</div>
</body>
</html>