-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
70 lines (66 loc) · 2.35 KB
/
index.html
File metadata and controls
70 lines (66 loc) · 2.35 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>我的移动端豆瓣首页</title>
<link rel="stylesheet" type="text/css" href="./css/base.css">
<link rel="stylesheet" type="text/css" href="./css/index.css">
<script type="text/javascript" src='./js/jquery.js'></script>
<script type="text/javascript" src="./js/jquery.cookie.js"></script>
<script type="text/javascript" src='./js/modules/activities.js'></script>
<script type="text/javascript">
var pixelRatio = 1 / window.devicePixelRatio;
document.write('<meta name="viewport" content="width=device-width,initial-scale=' + pixelRatio + ',minimum-scale=' + pixelRatio + ',maximum-scale=' + pixelRatio + '" />');
/*设置html字体大小,作为rem单位的基准*/
var html = document.getElementsByTagName('html')[0];
var pageWidth = html.getBoundingClientRect().width;
html.style.fontSize = pageWidth / 16 + 'px';
</script>
</head>
<body>
<div class="header-bar">
<h1 class="header-bar-title"><a href="./index.html">豆瓣</a></h1>
<ul class="nav">
<li>
<a href="./movie.html" class="header-bar-movie">电影</a>
</li>
<li>
<a href="./book.html" class="header-bar-books">图书</a>
</li>
<li>
<a href="#" class="header-bar-video">广播</a>
</li>
<li>
<a href="#" class="header-bar-team">小组</a>
</li>
</ul>
<span class="talion"><a href="search.html"></a></span>
</div>
<div class="indexload-img">
<img src="./img/loading_green.c0f9be0.gif">
</div>
</body>
<script type="text/javascript">
$(function() {
var init = new activities();
init.getEvents();
// 下拉加载更多内容
var loading = false; //全局变量,指定当前是否正在加载服务器端内容
$(document).scroll(function() {
if ((($(window).scrollTop() + $(window).height()) + 250) >= $(document).height()) {
if (loading == false) {
loading = true;
init.getMore();
loading = false;
}
}
});
// 内容加载时显示的动态图
if (loading == false) {
$('.indexload-img').show();
} else {
$('.indexload-img').hide();
}
})
</script>
</html>