-
Notifications
You must be signed in to change notification settings - Fork 0
/
content-iframe.phtml
58 lines (51 loc) · 1.55 KB
/
content-iframe.phtml
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
<!doctype html>
<html>
<head>
<title>Nested scroll test</title>
<style media="screen">
html,
body {
margin: 0;
}
body {
background: green;
}
html,
body,
.content-container {
height: 100%;
width: 100%;
}
iframe {
border: 0;
/*
height is completely destroyed by Apple's excuse for a browser, but you need to set
this to achieve the 'same' result in proper browsers. It will be the iframe that
scrolls rather than the content-container but it will look the same.
*/
height: 100%;
width: 100%;
}
.content-container {
position: relative;
-webkit-overflow-scrolling: touch;
overflow: auto;
font-size: 1px;
}
</style>
</head>
<body>
<div class="content-container">
<button id="boom" type="button">Change</button>
<script>
document.getElementById('boom').onclick = function () {
document.getElementById('shit').src = 'replace.phtml';
};
</script>
<iframe id="shit" name="shit"></iframe>
<script>
document.getElementById('shit').src = 'content.phtml';
</script>
</div>
</body>
</html>