-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
39 lines (36 loc) · 1.31 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>下厨房</title>
<link rel="stylesheet" href="http://at.alicdn.com/t/font_479520_aekkh9t7ti9vygb9.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_481140_ho42y7phbloc4n29.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_484171_5r1968jkf6h1714i.css">
<style>
html {
font-size: 100px; /*640设计稿:1REM=100PX*/
}
</style>
<script>
if(!window.Promise) {
document.writeln('<script src="https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js"'+'>'+'<'+'/'+'script>');
}
//响应式
~function () {
computedFont();
window.addEventListener('resize', computedFont, false);
function computedFont() {
var deviceW = document.documentElement.clientWidth;
if (deviceW > 640) return;
document.documentElement.style.fontSize = deviceW / 640 * 100 + 'px';
}
}();
</script>
</head>
<body>
<div id="root"></div>
</body>
</html>