Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
# WCStaticHTML
[点击查看](https://we11cheng.github.io/WCStaticHTML/)

<https://we11cheng.github.io/WCStaticHTML/>

### 教程 <https://github.com/we11cheng/WCStudy/blob/master/GitHub%E6%89%98%E7%AE%A1%E9%9D%99%E6%80%81HTML%E9%A1%B5%E9%9D%A2.md>

### 名字和开始时间可行修改。觉得可以的请star。感谢~
80 changes: 80 additions & 0 deletions calculateDate.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!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" />
<title>与你同在</title>
<style>
body {
-webkit-font-smoothing: antialiased;
font-family: Helvetica Neue, Helvetica, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
background-image: url('https://raw.githubusercontent.com/we11cheng/we11cheng.github.io/master/bg.jpg');
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">
<h2>小迷糊d大智慧,我们已经在一起了</h2>
<div class="timer">
<b id="d"></b> Days <b id="h"></b> Hours <b id="m"></b> Minutes <b id="s"></b> Seconds
</div>
</div>

<script>
function timer() {
window.setTimeout("show_date_time()", 1000);
var start = new Date("2019-01-01 00:00:00").getTime(); // 2015.7.2
var t = new Date().getTime() - 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>
39 changes: 32 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<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" />
<title>恋爱计时器</title>
<title>iPersistence</title>
<style>
body {
-webkit-font-smoothing: antialiased;
Expand Down Expand Up @@ -44,15 +44,15 @@

<body>
<div class="content">
<h2>iPersistence,我们已经在一起了</h2>
<h2>靳雨辰,我们已经在一起了</h2>
<div class="timer">
<b id="d"></b> Days <b id="h"></b> Hours <b id="m"></b> Minutes <b id="s"></b> Seconds
</div>
</div>

<script>
<script language="javascript">
function timer() {
var start = new Date("2018-06-07 00:00:00"); // 2015.7.2
window.setTimeout("show_date_time()", 1000);
var start = new Date("2025-05-03 00:06:00"); // 2015.7.2
var t = new Date().getTime() - start;
var h = ~~(t / 1000 / 60 / 60 % 24);
if (h < 10) {
Expand All @@ -62,7 +62,6 @@ <h2>iPersistence,我们已经在一起了</h2>
if (m < 10) {
m = "0" + m;
}

var s = ~~(t / 1000 % 60);
if (s < 10) {
s = "0" + s;
Expand All @@ -73,8 +72,34 @@ <h2>iPersistence,我们已经在一起了</h2>
document.getElementById('s').innerHTML = s;
}
timer();
setInterval(timer, 1000);
</script>
<!-->
<script language="javascript">
function show_date_time() {
window.setTimeout("show_date_time()", 1000);
BirthDay = new Date("6/7/2018 00:00:00");//这个日期是可以修改的
today = new Date();
timeold = (today.getTime() - BirthDay.getTime());
sectimeold = timeold / 1000
secondsold = Math.floor(sectimeold);
msPerDay = 24 * 60 * 60 * 1000
e_daysold = timeold / msPerDay
daysold = Math.floor(e_daysold);
e_hrsold = (e_daysold - daysold) * 24;
hrsold = Math.floor(e_hrsold);
e_minsold = (e_hrsold - hrsold) * 60;
minsold = Math.floor((e_hrsold - hrsold) * 60);
seconds = Math.floor((e_minsold - minsold) * 60);
document.getElementById('d').innerHTML = daysold;
document.getElementById('h').innerHTML = hrsold;
document.getElementById('m').innerHTML = minsold;
document.getElementById('s').innerHTML = seconds;
}
show_date_time();
</script>
<!-->

</body>

</html>

79 changes: 79 additions & 0 deletions indexbackup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!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" />
<title>与你同在</title>
<style>
body {
-webkit-font-smoothing: antialiased;
font-family: Helvetica Neue, Helvetica, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
background-image: url('https://raw.githubusercontent.com/we11cheng/we11cheng.github.io/master/bg.jpg');
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">
<h2>小迷糊d大智慧,我们已经在一起了</h2>
<div class="timer">
<b id="d"></b> Days <b id="h"></b> Hours <b id="m"></b> Minutes <b id="s"></b> Seconds
</div>
</div>

<script>
function timer() {
var start = new Date(2019, 0, 1); // 2015.7.2
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>
Loading