-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
40 lines (40 loc) · 1.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>转盘抽奖</title>
<link rel="stylesheet" href="css/normalize.css"/>
<link rel="stylesheet" href="css/shuffle.css"/>
<script>
(function (win,doc) {
var metaEl;
function setViewport() {
var psdWidth = 640;
var metaContent = ['width=' + psdWidth,'user-scalable=no'];
var scale = window.screen.width / psdWidth;
var ua = navigator.userAgent;
metaContent.push('minimum-scale=' + scale);
metaContent.push('maximum-scale=' + scale);
var match = ua.match(/Android (\d+\.\d+)/);
if (match){
metaContent.push('target-densitydpi=device-dpi');
}
metaEl = metaEl || doc.createElement('meta');
metaEl.setAttribute('name', 'viewport');
metaEl.setAttribute('content',metaContent.join(','));
doc.documentElement.firstElementChild.appendChild(metaEl);
}
setViewport();
win.addEventListener('resize',setViewport , false);
})(window,document);
</script>
</head>
<body>
<section class="wrapper">
<div class="label"></div>
<div class="pointer"></div>
</section>
</body>
<script src="js/jquery.js"></script>
<script src="js/shuffle.js"></script>
</html>