-
Notifications
You must be signed in to change notification settings - Fork 236
/
pageResponse_contain.html
47 lines (44 loc) · 1.54 KB
/
pageResponse_contain.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
<!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>demo</title>
<style type="text/css">
*{padding: 0;margin: 0;}
img{border: none;}
html,body{height: 100%;}
h1,p{width: 100%;color: #FFFFFF;font-size: 15px;position: absolute;top: 248px;left: 0;text-align: center;line-height: 1;}
p{font-size: 9px;top: 282px;}
.page{
position: relative;
width: 320px;
height: 504px;
overflow: hidden;
background-color: black;
}
</style>
</head>
<body>
<div class="page">
<img src="img/demo.jpg" alt="" width="320" height="504">
<h1>你一定也有过一个翱翔天际的梦</h1>
<p>- 回家,或踏上旅途,飞机是自由的符号 -</p>
</div>
<script type="text/javascript" src="js/pageResponse.min.js"></script>
<script type="text/javascript">
window.onload = window.onresize = function(){
pageResponse({
selectors : '.page', //模块选择器,使用querySelectorAll的方法
mode : 'contain', // auto || contain || cover ,默认模式为auto
width : '320', //输入页面的宽度,只支持输入数值,默认宽度为320px
height : '504' //输入页面的高度,只支持输入数值,默认高度为504px
})
}
</script>
</body>
</html>