-
Notifications
You must be signed in to change notification settings - Fork 140
/
index.html
34 lines (34 loc) · 1.29 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vue3 Vite TS Demo</title>
<style>
.max640 {
max-width: 640px;
margin: auto;
}
</style>
<script type="text/javascript">
//简化压缩版 flexible.min.js ,根据实际情况决定是否使用
! function(e, t) {
function n() {
var n = s.getBoundingClientRect().width;
t = t || 540, n > t && (n = t);
var i = 100 * n / e;
s.style.fontSize = i + "px"
}
var i, o = document,
d = window,
s = o.documentElement;
n(), d.addEventListener("resize", function() { clearTimeout(i), i = setTimeout(n, 300) }, !1), d.addEventListener("pageshow", function(e) { e.persisted && (clearTimeout(i), i = setTimeout(n, 300)) }, !1), d.addEventListener("DOMContentLoaded", function() { o.body.style.position = "relative", o.body.style.fontSize = "16px", o.body.style.margin = "0 auto", o.body.style.maxWidth = t + "px" }, !1)
}(720, 640);
</script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>