forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverflow-scroll.html
57 lines (53 loc) · 1.26 KB
/
overflow-scroll.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width">
<style>
.scroller {
width: 200px;
height: 200px;
border: 1px solid black;
overflow: scroll;
}
.content {
width: 200%;
height: 200%;
}
.box {
width: 100px;
height: 100px;
background-color: blue;
}
.box.appear {
display: none;
}
.content.changed .box.appear {
display: block;
}
.box.disappear {
display: block;
}
.content.changed .box.disappear {
display: none;
}
.composited {
transform: translateZ(0);
}
</style>
<script>
function changeScrollerSubviews()
{
document.getElementById('scroll-content').classList.add('changed');
}
</script>
</head>
<body>
<div class="composited scroller">
<div id="scroll-content" class="content">
Content
<div class="composited box appear">appear</div>
<div class="composited box disappear">disappear</div>
</div>
</div>
</body>
</html>