-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (41 loc) · 1.59 KB
/
index.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
58
59
60
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="initial-scale=1.0, user-scalable=0, width=device-width, height=device-height">
<title>Show your window size</title>
<meta name="description" content="Show your window size">
<meta name="author" content="溫奕書 / Eddie Wen">
<meta name="URL" content="http://github.eddiewen.me/windowSize/">
<meta name="image" content="http://github.eddiewen.me/windowSize/image.png">
<!-- Open Graph -->
<meta property="og:site_name" content="windowSize">
<meta property="og:title" content="windowSize">
<meta property="og:description" content="Show your window size">
<meta property="og:type" content="website">
<meta property="og:url" content="http://github.eddiewen.me/windowSize/">
<meta property="og:image" content="http://github.eddiewen.me/windowSize/image.png">
<!-- Google Font -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<h3 id="wt" class="width top"></h3>
<h3 id="wb" class="width bottom"></h3>
<div class="horizontal">
<h3 id="hl" class="height left"></h3>
<h3 id="hr" class="height right"></h3>
</div>
<script>
window.onload = function() {
const wd = screen.width;
const wh = screen.height;
document.getElementById("wt").innerHTML = wd;
document.getElementById("wb").innerHTML = wd;
document.getElementById("hl").innerHTML = wh;
document.getElementById("hr").innerHTML = wh;
}
</script>
</body>
</html>