-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
45 lines (41 loc) · 1.07 KB
/
index.html
File metadata and controls
45 lines (41 loc) · 1.07 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no,viewport-fit=cover">
<link rel="stylesheet" href="//at.alicdn.com/t/font_821596_pu5kjj86mg.css">
<title>供应链</title>
<style>
#app {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script>
var url = './static/css/iphonex.css';
function addCssByLink(url) {
var link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", url);
var heads = document.getElementsByTagName("head");
if (heads.length)
heads[0].appendChild(link);
else
document.documentElement.appendChild(link);
}
if (isIphoneX()) {
addCssByLink(url)
}
// 判断是否为ipx
function isIphoneX() {
return /iphone/gi.test(navigator.userAgent) && (screen.height == 812 && screen.width == 375)
}
</script>
</html>