-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
35 lines (35 loc) · 1.04 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=0" />
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script>
;(function audoWidth() {
var e = 375
if (screen.width !== e) {
var i = document.querySelector("meta[name='viewport']"),
t = screen.width,
n = 1
if (screen.width === 1080) {
t = 360
}
if (/Android\s4\.3.*UCBrowser\/11\.1\.0\.870.*/.test(window.navigator.userAgent)) {
t = 360
}
n = t / e
i.content = 'width=' + e + ',initial-scale=' + n + ',maximum-scale=' + n + ',minimum-scale=' + n
}
// 针对PC端的处理
if (screen.width > 1080) {
i.content = 'width=device-width, initial-scale=1.0'
}
})()
</script>
</body>
</html>