直接访问点我进入–> http://time.ddda.cc/

未加ssl可能会报不安全,正常访问即可

如果不放心其代码如下:



<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>研究生考试倒计时</title>
</head>

<link rel="stylesheet" href="https://time.ddda.cc/gaokao.css">
<link rel="stylesheet" href="https://time.ddda.cc/sky.css">
<script src="https://time.ddda.cc/sky.js"></script>

<body>

    <div class="all">
        <div id="wrap">
            
            <canvas id="canvas" width="1920" height="1080"></canvas>
        </div>

<div id="Reporting">
<script language="javaScript" >
now = new Date(),hour = now.getHours()
if (hour<6){document.write(" 凌晨好!同学!")}
else if (hour<9){document.write("早上好,同学!")}
else if (hour<12){document.write("上午好,同学!")}
else if (hour<14){document.write("中午好,同学!")}
else if (hour<17){document.write("下午好!同学!")}
else if (hour<19){document.write("傍晚好!同学!")}
else if (hour<22){document.write("晚上好!同学!")}
else {document.write("夜深了,学习注意眼睛哦!")}
</script>
</div>

<h2> ·距离2023年研究生考试(2022.12.25)还有·</h2>

<div id="timer"></div>
<script language="javascript" type="text/javascript">
    timer('2022-12-25 0:00:00','day');
 
    /**
     * 入参第一个为时间字符串,第二个参数为模式选择,如果传入'day',按天数倒计时到秒,不传值,按小时精确到秒
     * @param timeStr
     * @param item
     */
    function timer(timeStr,item){
        setInterval(function(){
            let nowTime = new Date(timeStr) - new Date;
            let minutes = parseInt(nowTime / 1000 / 60 % 60, 10);//计算剩余的分钟
            let seconds = parseInt(nowTime / 1000 % 60, 10);//计算剩余的秒数
 
 
            minutes = checkTime(minutes);
            seconds = checkTime(seconds);
            if(item==='day'){
                let days = parseInt(nowTime / 1000 / 60 / 60 / 24, 10); //计算剩余的天数
                let hours = parseInt(nowTime / 1000 / 60 / 60 % 24, 10); //计算剩余的小时
                days = checkTime(days);
                hours = checkTime(hours);
                document.getElementById('timer').innerHTML=days + "天" + hours + "小时" + minutes + "分" + seconds + "秒";
            }
            else{
                let hours = parseInt(nowTime / ( 1000 * 60 * 60), 10); //计算剩余的小时
                hours = checkTime(hours);
                document.getElementById("timer").innerHTML = hours + "小时" + minutes + "分" + seconds + "秒";
            }
        },1000);
    }
 
    function checkTime(i) { //将0-9的数字前面加上0,例1变为01
        if (i < 10) {
            i = "0" + i;
        }
        return i;
    }
</script>


<a class="brinks">寄语:在奋斗的过程中,常会遭受挫折,惟有坚持到底,才会获得最后的成功!</a>	

<hr>
<div class="bottomsay"></div>
<details>
<summary>
关于
</summary>
<p class="bottomsay">创作者:风之遐想</p>
<p class="bottomsay">本版本为未减休息与睡觉时间的正常版本</p>
<p class="bottomsay">本版本为减去租住酒店等相关时间</p>

</details>
</div>


</body>
</html>
上一篇 下一篇