forked from headjs/headjs
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
104 lines (83 loc) · 2.22 KB
/
index.html
File metadata and controls
104 lines (83 loc) · 2.22 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!doctype html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]><link rel="stylesheet" href="assets/html5.css" /><![endif]-->
<script src="src/core.js"></script>
<script src="src/css3.js"></script>
<script src="src/load.js"></script>
<style>
body {
width:600px;
margin:50px auto;
}
#result {
border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
box-shadow: 10px 10px 20px black;
-webkit-box-shadow: 10px 10px 20px black;
font-family: Times New Roman;
font-size: 16px;
font-weight: bold;
padding: 5px;
}
#sprite {
background-image: url(assets/browser_logos-64.png);
height: 64px;
width: 64px;
color: black;
font-weight: bold;
}
.ie #sprite {
background-position: -286px -2px;
}
.ff #sprite {
background-position: -78px -2px;
}
.chrome #sprite {
background-position: -6px -2px;
}
.opera #sprite {
background-position: -145px -2px;
}
.safari #sprite {
background-position: -210px -2px;
}
.w-lte1024 #result {
background-color: beige;
}
.h-lte600 #result {
color: darkgray;
}
header {
padding: 5px;
background-color: #eeeeee;
text-align: center;
}
</style>
</head>
<body>
<header><h3>Resize window to see changes</h3></header>
<div id="sprite"></div>
<pre>
.w-lte1024 #result {
background-color: beige;
}
.h-lte600 #result {
color: darkgray;
}
</pre>
<div id="result"></div>
<script>
function showResult() {
document.getElementById("result").innerHTML = document.documentElement.className;
}
if (window.addEventListener) {
window.addEventListener("resize", showResult, false);
}
else {
window.attachEvent("onresize", showResult);
}
document.getElementById("result").innerHTML = document.documentElement.className;
document.getElementById("sprite").innerHTML = head.browser.version;
</script>
</body>