-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
171 lines (160 loc) · 7.44 KB
/
demo.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>家长空间</title>
<link rel="stylesheet" href="skin/style.css">
</head>
<body>
<div class="tab_change">
<ul>
<li tab="main" class="current">主页</li>
</ul>
</div>
<div class="tab_content">
<div id="mainList" class="main_list">
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
<div class="item_box">
<div class="item_header">
<img class="photo_bg" src="skin/photo_bg.png" alt="">
<img class="photo" src="skin/headerPic.png" alt="">
<div class="item_title"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class="orange">A</i></div>
<div class="item_time">10月12日</div>
</div>
<div class="item_content">henhao</div>
<div class="item_bg"></div>
</div>
</div>
</div>
<input type="hidden" id="toNext" />
<input type="hidden" id="toPreve" />
</body>
<script type="text/javascript" src="jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="jquery.slider.js"></script>
<script type="text/javascript">
(function() {
initHtmlFontSize();
$(window).bind('resize', initHtmlFontSize);
//初始化根字体大小
function initHtmlFontSize() {
var W = $(document).width();
var S = 7.5;
S = W > 750 ? 10 : S;
W = W > 750 ? 750 : W;
$('html').css('font-size', W / S + 'px');
}
var $mainList = $("#mainList");
//下拉刷新
$mainList.slider({
toNext: $("#toNext"),
toPreve: $("#toPreve"),
url: "data.json",
param: {
userGid: "",
currentPage: 1,
pageSize: 20
},
done: function(resdata) {
if (resdata && resdata.data.length > 0) {
var data = resdata.data;
var strHtml = "";
for (var i = 0, l = data.length; i < l; i++) {
strHtml += "<div class=\"item_box\">";
strHtml += "<div class=\"item_header\">";
strHtml += "<img class=\"photo_bg\" src=\"skin/photo_bg.png\">";
strHtml += "<img class=\"photo\" src=\"skin/headerPic.png\">";
strHtml += "<div class=\"item_title\"><em>黄梓琪1</em> 为曾小勇添加了一条评价:<i class=\"orange\">A</i></div>";
strHtml += "<div class=\"item_time\">10月12日</div>";
strHtml += "</div>";
strHtml += "<div class=\"item_content\">henhao</div>";
strHtml += "<div class=\"item_bg\"></div>";
strHtml += "</div>";
}
$("#mainList").append(strHtml);
}
}
});
})()
</script>
</html>