-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (29 loc) · 954 Bytes
/
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
<!DOCTYPE html>
<html lang="en" ng-app="myApp">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Title</title>
<link rel="stylesheet" href="./css/app.min.css">
</head>
<body>
<!--<script>document.querySelector('html').style.fontSize = (document.body.clientWidth / 375 * 16 + 'px');
window.addEventListener('resize', function () {
window.location.reload();
})
</script>-->
<script type="text/javascript">
window.addEventListener('resize', setRem);
window.addEventListener('orientationchange', setRem);
function setRem() {
var html = document.querySelector('html');
var width = html.getBoundingClientRect().width;
html.style.fontSize = width / 16 + 'px';
}
setRem()
</script>
<div ui-view></div>
<script src="./js/lib-bundle.min.js"></script>
<script src="./js/app.min.js"></script>
</body>
</html>