-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
182 lines (170 loc) · 4.37 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="renderer" content="webkit">
<title>滑动的下载页</title>
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<style type="text/css">
*
{
padding: 0;
margin: 0;
}
img
{
border: 0 none;
}
.swipe-wrap
{
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
z-index: 2;
}
.swipe
{
position: absolute;
width: 100%;
}
.swipe-box
{
position: relative;
width: 100%;
overflow: hidden;
}
.download
{
position: fixed;
margin: 0 auto;
padding: 0px 25px 0px 25px;
left: 0;
bottom: 60px;
right: 0;
text-align: center;
z-index: 3;
}
#lbtn {
margin-right: 10px;
}
.next
{
position: fixed;
margin: 0 auto;
left: 0;
bottom: 10px;
right: 0;
text-align: center;
z-index: 3;
}
.next img
{
width: 20px;
}
</style>
</head>
<body>
<div class="swipe-wrap" id="slip">
<article class="swipe">
<div class="swipe-box">
<img id="img1" src="img/p1.png">
</div>
<div class="swipe-box">
<img id="img3" src="img/p2.png">
</div>
<div class="swipe-box">
<img id="img4" src="img/p3.png">
</div>
<div class="swipe-box">
<img id="img5" src="img/p4.png">
</div>
</article>
</div>
<div class="download">
<a href="#">
<img id="lbtn" src="img/android.png" />
</a>
<a href="#">
<img id="rbtn" src="img/ios.png" />
</a>
</div>
<div class="next">
<img src="img/next.png" />
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/slip.min.js"></script>
<script type="text/javascript">
$(function () {
var winWidth = $(window).width();
var winHeight = $(window).height();
// alert( winWidth + ' ' + winHeight)
$("#img1").width(winWidth);
$("#img3").width(winWidth);
$("#img4").width(winWidth);
$("#img5").width(winWidth);
// 设置下载按钮样式
$("#lbtn").css("width", (winWidth-70)/2);
$("#rbtn").css("width", (winWidth-70)/2);
var container = document.getElementById('slip');
var pages = document.querySelectorAll('.swipe-box');
var slip = Slip(container, 'y').webapp(pages);
// 此处 判断是否是最后一张 如果是隐藏向下箭头图标
slip.end(function() {
if (this.page === 3) {
$(".next").css("display","none");
}else{
$(".next").css("display","");
}
});
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}
function is_mobileQQ() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/\sQQ/i) == " qq") {
return true;
} else {
return false;
}
}
var isWeixin = is_weixin();
var isMobileQQ = is_mobileQQ();
var weixinTip = $('<div id="weixinTip"><p><img src="img/live_weixin.png" alt="微信打开"/></p></div>');
// alert(isWeixin)
// alert(isMobileQQ)
if(isWeixin || isMobileQQ){
$("#slip").before(weixinTip);
}
$("#weixinTip").css({
"position":"fixed",
"left":"0",
"top":"0",
"height":winHeight,
"width":"100%",
"z-index":"1000",
"background-color":"rgba(0,0,0,0.8)",
"filter":"alpha(opacity=80)",
});
$("#weixinTip p").css({
"text-align":"center",
"margin-top":"10%",
// "padding-left":"5%",
// "padding-right":"5%"
});
$("#weixinTip p img").css({
"width":winWidth/3*2,
"margin-right":"-70px",
});
});
</script>
</body>
</html>