-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (35 loc) · 998 Bytes
/
Copy pathindex.html
File metadata and controls
42 lines (35 loc) · 998 Bytes
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 lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tim Walker</title>
<style>
* {
margin: 0;
}
iframe {
border: none;
}
body {
overflow-y: hidden;
}
</style>
</head>
<body>
<iframe id="iframe" name="iframe" height="100%" width="100%" src="https://www.bilibili.com/" scrolling="auto"
frameborder="0" onload="changeFrameHeight()"></iframe>
<script type="text/javascript">
function changeFrameHeight() {
var iframe = document.getElementById("iframe");
iframe.height = document.documentElement.clientHeight;
}
//onresize属性可以用来获取或设置当前窗口的resize事件的事件处理函数
//onresize事件会在窗口或框架被调整大小时发生
window.onresize = function () {
changeFrameHeight();
}
</script>
</body>
</html>