-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patha.html
56 lines (54 loc) · 1.39 KB
/
a.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
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, minimum-scale=1" />
<script>
// Set the browser control height but set them to be hidden so that the
// viewport is taller than the root scroller. This test passes if the root
// scroller's background is painted into the enitre height of the viewport.
// That is, the full viewport should be grey.
// NOTE: It is important that this test be run with the Android viewport
// flags turned on.
if (window.internals) {
window.internals.setBrowserControlsState(100, false);
}
addEventListener("load", function() {
var iframe = document.getElementById("iframe");
document.rootScroller = iframe;
iframe.contentDocument.rootScroller = iframe.contentDocument.getElementById("scroller");
});
</script>
<style>
::-webkit-scrollbar {
width: 0px;
height: 0px;
}
html, body {
height: 100vh;
width: 100%;
margin: 0;
}
body {
background-color: red;
}
#iframe {
position: absolute;
width: 100%;
height: 100%;
border: 0;
}
</style>
<iframe id="iframe" srcdoc="
<style>
html,body {
height: 100vh;
width: 100%;
margin:0;
background-color: maroon;
}
#scroller {
position: absolute;
width: 100%;
height: 100%;
background-color: grey;
}
</style>
<div id='scroller'></div>"></iframe>