【构思】
因为只需要的是两小时,所以时间直接写死,然后通过setInterval每1000ms对时间进行减1操作
前期未考虑到当时分秒小于10的状态,所以后面又加上了一个checkTime()来进行限制,小时则直接在变量中加了。
【步骤】
<html>
<head>
<title>2小时倒计时</title>
<style>
*{
margin: 0;
padding: 0;
}
.cutDown{
width: 100%;
height: 100%;
background: url(2.jpg) no-repeat;
background-size: 100%;
text-align: center;
color: #fff;
font-size: 80px;
font-weight: 100;
font-family: monospace;
position: absolu