love.vvzero.com/index.html

82 lines
2.2 KiB
HTML
Raw Normal View History

2018-01-23 19:57:39 +08:00
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
2022-02-12 20:12:58 +08:00
<link rel="shortcut icon" href="/favicon.ico">
<title>张玲.我爱你</title>
2018-01-23 19:57:39 +08:00
<style>
body {
-webkit-font-smoothing: antialiased;
font-family: Helvetica Neue, Helvetica, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
2022-02-12 20:12:58 +08:00
background-color: #FFCC99;
2018-01-23 19:57:39 +08:00
font-size: 85%;
margin: 0;
}
h2 {
font-size: 220%;
font-weight: 400;
}
.content {
position: absolute;
width: 100%;
top: 40%;
transform: translate(0, -50%);
text-align: center;
}
.timer {
font-size: 180%;
line-height: 1.5;
margin: 1em 0;
}
.timer b {
color: rgb(253, 99, 125);
}
</style>
</head>
<body>
<div class="content">
2022-02-12 20:12:58 +08:00
<h2>猪,我们已经在一起了</h2>
2018-01-23 19:57:39 +08:00
<div class="timer">
2022-02-12 20:12:58 +08:00
<b id="d"></b><b id="h"></b><b id="m"></b><b id="s"></b>
2018-01-23 19:57:39 +08:00
</div>
</div>
<script>
function timer() {
2022-02-12 20:12:58 +08:00
var start = new Date(2016, 9, 21); // 2016.10.21
2018-01-23 19:57:39 +08: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>
</body>
</html>