-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (50 loc) · 1.49 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
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="./src/assets/all.css" />
<link rel="shortcut icon" href="./src/assets/img/favicon.ico" />
<title>SDUT OJ Annual Report</title>
<style>
body {
font-family: "Varela Round";
width: 100vw;
height: 100vh;
overflow: hidden;
background-size: cover;
background-image: url('./src/assets/img/sdutacm_bg_desktop.jpg');
z-index: -3;
display: flex;
justify-content: center;
}
</style>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
<script>
const app = document.querySelector("#app");
const body = document.querySelector("body");
// app.style.width = 10 + "rem";
app.style.position = "relative";
const useRem = () => {
let w = window.innerWidth;
if (w > 700) {
app.style.width = 10+"rem"
w /= 40;
body.style.MaxHeight = 50+"vh"
} else {
w /= 10;
app.style.width=100+"vw"
app.style.height = 100 + "vh"
body.style.maxWidth=app.style.width
}
let size = w + "px";
document.documentElement.style.fontSize = size;
};
window.addEventListener("resize", useRem);
useRem();
</script>
</body>
</html>