-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
58 lines (54 loc) · 1.39 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
<title>瞎听音乐</title>
<style type="text/css">
body {
background: #f2f3f4;
width: 100%;
/* height:1000px; */
-webkit-overflow-scrolling: touch;
}
body::-webkit-scrollbar {
display: none;
}
/* 根据屏幕设置像素大小 */
@media screen and (max-width:321px) {
#app {
font-size: 15px
}
}
@media screen and (min-width:321px) and (max-width:400px) {
#app {
font-size: 16px
}
}
@media screen and (min-width:400px) {
#app {
font-size: 18px
}
}
</style>
<script>
;
(function (doc, win, undefined) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in win ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (clientWidth === undefined) return;
docEl.style.fontSize = clientWidth / 7.5 + 'px'; // 50
};
if (doc.addEventListener === undefined) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false)
})(document, window);
</script>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>