-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtmp.html
executable file
·39 lines (38 loc) · 1.53 KB
/
tmp.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>
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<title>PSD TO HTML</title>
<script type="text/javascript">
(function(win, doc, dw) {
var docEl = doc.documentElement,
dw = dw || 640,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function() {
var docElWidth = docEl.clientWidth;
(docElWidth > dw) && (docElWidth = dw);
if (!docElWidth) return;
docEl.style.fontSize = docElWidth / (dw / 100) + 'px'; //基于750px设计稿
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(window, document, 750);
</script>
<style type="text/css">
* { margin:0; padding:0; }
html, body { height:100%; width:100%; position: relative; overflow-x: hidden; }
.wrap { height:100%; position: relative; overflow: hidden;}
</style>
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<div class="wrap">
</div>
</body>
</html>