-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
207 lines (184 loc) · 5.86 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<!-- Copyright © 2020 by [email protected] -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MHCII Fan</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<style>
html,
body {
height: 100%;
}
.wrap {
position: relative;
height: 100%;
width: 100%;
background-image: url(https://bing.mcloc.cn/api);
background-size: cover;
background-position: center;
}
.wrap-son {
width: 100%;
height: 100%;
position: absolute;
top: 0;
background: rgba(59, 59, 59, 0.3);
}
.jumbotron {
background: rgba(255, 255, 255, 0);
color: #f5f5f5;
}
.love {
color: #ffffff;
margin: 0 20px;
line-height: 1.3;
font-weight: 300;
}
.hans-container {
position: fixed;
bottom: 0px;
width: 100%;
height: 120px;
z-index: 1;
}
.timer b {
font-size: 50px;
}
#s {
font-size: 80px;
}
#updatalove,
#to_comments {
margin: 0 10px;
}
.copy {
position: absolute;
bottom: 0;
color: #ffffff;
font-size: 12px;
}
/* 评论 */
.comment {
margin-top: 30px;
margin-bottom: 100px;
/* 波浪 */
}
.hans-container{
position: fixed;
bottom: 0px;
width: 100%;
height: 120px;
}
</style>
</head>
<body>
<div class="wrap">
<div class="wrap-son">
<div class="container-fluid">
<div class="box">
<div class="jumbotron text-center">
<br>
<br>
<h1><br>我们在一起了</h1>
<h3 class="timer">
<div class="row">
<br>
<b id="d"></b> Days <b id="h"></b>Hours <b id="m"></b> Minutes
</div>
<div class="row">
<br>
<b id="s"></b> S
</div>
</h3>
<p>
<a id="updatalove" class="btn btn-primary btn-lg" role="button" href="orange.html">I 😘 Fan</a>
<a id="to_comments" class="btn btn-primary btn-lg" role="button">留个言吧</a>
</p>
<script type="text/javascript" src="https://api.vvhan.com/api/love?type=js">
</script><script>ishan()</script>
</div>
</div>
<div class="row">
<h4 class="love text-center"><span class="love-son"></span></h4>
</div>
<div id="hans-bolang"></div>
</div>
</div>
</div>
<div class="container-fluid" id="comments">
<div class="row comment">
<div class="col-xs-10 col-sm-10 col-md-6 col-xs-push-1 col-sm-push-1 col-md-push-3">
<h2>留言:</h2>
<div id="vcomments"></div>
</div>
</div>
</div>
<script src="js/jquery-1.11.0.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src='js/Valine.min.js'></script><!-- Valine 评论系统 -->
<!-- 计时器 -->
<script>
function timer() {
var start = new Date(2020, 06, 18, 22, 57, 18); // 2020.07.31 13:14:00
var t = new Date() - start;
var h = ~~(t / 1000 / 60 / 60 % 24);
if (h < 10) {
h = "0" + h;
}
var m = ~~(t / 1000 / 60 % 60);
if (m < 10) {
m = "0" + m;
}
var s = ~~(t / 1000 % 60);
if (s < 10) {
s = "0" + s;
}
document.getElementById('d').innerHTML = ~~(t / 1000 / 60 / 60 / 24);
document.getElementById('h').innerHTML = h;
document.getElementById('m').innerHTML = m;
document.getElementById('s').innerHTML = s;
}
timer();
setInterval(timer, 1000);
</script>
<script>
var oComments = document.querySelector("#comments");
var oCommentsTop = Math.round(oComments.offsetTop);
//运动框架
function move() {
// 1. 关闭开启定时器;
clearInterval(timer);
var timer = setInterval(function () {
// 2. 计算速度;
var iNow = document.documentElement.scrollTop || document.body.scrollTop; //100
iNow = Math.round(iNow);
var speed = (oCommentsTop - iNow) / 10;
// 3. 速度取整;
if (speed > 0) {
speed = Math.ceil(speed);
} else {
speed = Math.floor(speed);
}
document.documentElement.scrollTop = document.body.scrollTop = iNow + speed + 1;
// 4. 终止条件;
if (iNow >= oCommentsTop) {
clearInterval(timer);
}
}, 20)
}
to_comments.onclick = move;
</script>
<!-- Valine 评论系统; 由 LeanCloud 管理数据 -->
<script>
new Valine({
el: '#vcomments',
appId: '',
appKey: ''
})
</script>
<div id="hans-bolang"></div>
<script src="js/wave.js"></script>
</body>
</html>