-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmobile-index.html
61 lines (59 loc) · 2.26 KB
/
mobile-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
61
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Hello world</title>
<link rel="icon" href="//www.jd.com/favicon.ico" type="image/x-icon" />
<link rel="dns-prefetch" href="//static.360buyimg.com" />
<link rel="dns-prefetch" href="//misc.360buyimg.com" />
<link rel="dns-prefetch" href="//img10.360buyimg.com" />
<link rel="dns-prefetch" href="//img11.360buyimg.com" />
<link rel="dns-prefetch" href="//img12.360buyimg.com" />
<link rel="dns-prefetch" href="//img13.360buyimg.com" />
<link rel="dns-prefetch" href="//img14.360buyimg.com" />
<link rel="dns-prefetch" href="//img20.360buyimg.com" />
<link rel="dns-prefetch" href="//img30.360buyimg.com" />
<link rel="dns-prefetch" href="//m.360buyimg.com" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1"/>
<script type="text/javascript" src="//storage.jd.com/jdview-h5/eruda.js"></script>
<script>
eruda.init({
tool: ['console', 'elements', 'network']
});
console.log(sessionStorage)
console.log(navigator.userAgent)
document.querySelector('.eruda-dev-tools').style.height = '40%';
</script>
<script type="text/javascript">
(function(){
function setFontSize() {
var deviceWidth = document.documentElement.clientWidth || document.body.clientWidth;
if( deviceWidth > 768 ) {
deviceWidth = 768;
} else if( deviceWidth < 320 ) {
deviceWidth = 320;
}
document.documentElement.style.fontSize = (deviceWidth / 7.5) + 'px';
}
setFontSize();
window.addEventListener("onorientationchange", function(){
switch(window.orientation){
case 90:
setFontSize();
break;
case -90:
setFontSize();
break;
}
}, false);
window.addEventListener("resize", setFontSize, false);
})();
</script>
</head>
<body>
<div id="app"></div>
<script src="./index.js"></script>
</body>
</html>