-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
152 lines (134 loc) · 4.39 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<link rel="stylesheet" href="css/h5.css">
<link rel="stylesheet" href="css/h5Loading.css">
<title>京东618销售情况汇总</title>
<style>
body {
margin: 0;
padding: 0;
}
.h5-page {
background-image: url(img/page_bg.jpg);
}
.h5-page-face {
background-image: url(img/face_bg.jpg);
}
.h5-component-name-slogan {
-webkit-animation: rock 2s infinite 2s;
}
.h5-component-name-caption {
background-image: url(img/page_caption_bg.png);
width: 283px;
height: 160px;
text-align: center;
line-height: 140px;
font-size: 20px;
color: #fff
}
.h5-component-name-title {
-webkit-animation: rock 2s infinite 2s;
}
@-webkit-keyframes rock {
0% {
transform: rotate(0deg);
}
5% {
transform: rotate(3deg)
}
10% {
transform: rotate(-4deg)
}
15% {
transform: rotate(3deg)
}
20% {
transform: rotate(-2deg)
}
25% {
transform: rotate(1deg)
}
30% {
transform: rotate(-1deg)
}
70% {
transform: rotate(0deg)
}
}
.h5-component-name-back {
top: 30px;
-webkit-animation: back 2s infinite 2s;
}
@-webkit-keyframes back {
50% {
top: 20px;
}
}
</style>
</head>
<body>
<div class="loading">
<div class="double-bounce1"></div>
<div class="double-bounce2"></div>
<div id="rate">0%</div>
</div>
<!--再输loading组件资源-->
<script src="js/h5Loading.js"></script>
<!--载入所有组件资源-->
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="https://cdn.bootcss.com/fullPage.js/2.9.4/jquery.fullpage.min.js"></script>
<script src="js/h5.js"></script>
<!--载入H5相关资源-->
<script>
var res = ['Base', 'Polyline', 'Bar', 'Bar-v', 'Point', 'Radar', 'Pie'];
var html = [];
for (s in res) {
html.push('<script type="text/javascript" src="js/h5Component' + res[s] + '.js"><\/script>');
html.push('<link rel="stylesheet" type="text/css" href="css/h5Component' + res[s] + '.css">');
}
document.write(html.join(''));
</script>
<script>
$(function () {
var h5 = new H5();
// 每次添加页面都自动添加一个footer
h5.whenAddPage = function () {
this.addComponent('footer', {
bg: 'img/footer.png',
css: {
opacity: 0,
bottom: -20,
height: 20,
width: '100%',
left: 0,
zIndex: 999
},
animateIn: {
opacity: 1,
bottom: 0
},
animateOut: {
opacity: 0,
bottom: '-20px'
},
delay: 500
})
};
$.getJSON('data.json', function (json) {
$.each(json, function (i, item) {
if (item.isPage) {
h5.addPage(item.name, item.text);
} else {
h5.addComponent(item.name, item.cfg)
}
});
h5.loader(['img/description_bg.gif', 'img/face_bg.jpg', 'img/face_img_left.png', 'img/face_img_right.png', 'img/face_logo.png', 'img/face_slogan.png', 'img/footer.png', 'img/p1_people.png', 'img/page_bg.jpg', 'img/page_caption_bg.png', 'img/tail_back.png', 'img/tail_logo.png', 'img/tail_share.png']);
});
})
</script>
</body>
</html>