验证中...
CountDown.html
Raw Copy
<!doctype html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="Generator" content="EditPlus®">
<meta name="Author" content="wzq">
<meta name="Keywords" content="倒计时">
<meta name="Author" content="倒计时网页,使用时用浏览器打开,并按F11进入全屏模式">
<meta http-equiv="X-UA-Compatible" content="IE=10">
<style>
html {
/*隐藏滚动条,当IE下溢出,仍然可以滚动*/
-ms-overflow-style: none;
/*火狐下隐藏滚动条*/
overflow: -moz-scrollbars-none;
}
/*Chrome下隐藏滚动条,溢出可以透明滚动*/
html::-webkit-scrollbar {
width: 0px
}
body {
margin: 0px;
padding: 0px;
background-image: url(bg.jpg);
/* 设置背景图片,放在与网页同一目录,名称与URL括号里一致 */
background-size: 100% 100%;
-moz-background-size: 100% 100%;
background-repeat: no-repeat;
width: 1024px;
/*var(--w);*/
height: 768px;
/*var(--h);/* 设置屏幕高度,查一下分辨率 */
text-align: center;
}
.space {
padding-top: 9%;
}
/* 设置单个间隔高度属性 */
#dsc,
#timer {
color: #ff3333;
/* 设置文字颜色 */
font-weight: bold;
/* 设置文字加粗 */
}
</style>
<!-- 设置标题 字幕会同步更新-->
<title>全国“两会”</title>
</head>
<body onload="countTime()" scroll=“no”>
<script language="javascript">
//设置网页高度
var height= window.screen.height-0.0001;
var width=window.screen.width;
//document.documentElement.style.setProperty('--h', height+ "px");
//document.documentElement.style.setProperty('--w', width+ "px");
//ie 设置高度
document.getElementsByTagName("body")[0].style.height = String(height)+ "px";
document.getElementsByTagName("body")[0].style.width = String(width)+ "px";
function countTime(){
//alert(height);
//bd.style.setProperty('--height', this.value);
//获取当前时间
var date=new Date();
var now=date.getTime();
//设置截止时间
var str="2018/3/3 00:00:00";//<----这里设置保电节点时间
var endDate=new Date(str);
var end=endDate.getTime();
//时间差
var leftTime=end-now;
var deviation=Math.abs(leftTime);
//定义变量d,h,m,s;
var d,h,m,s;
d=Math.floor(deviation/1000/60/60/24);
h=Math.floor(deviation/1000/60/60%24);
m=Math.floor(deviation/1000/60%60);
s=Math.floor(deviation/1000%60);
var timer="";
timer+=d+"天"+h+"小时"+m+"分钟"+s+"秒";
document.getElementById("timer").innerHTML=timer
if(leftTime<=0){
document.getElementById("dsc").innerHTML=document.title+'保电已经持续';
}
else{
document.getElementById("dsc").innerHTML='距离'+document.title+'召开”还有';
}
setTimeout(countTime,1000);
}
</script>
<div class="space"></div>
<!-- 设置间隔-->
<div class="space"></div>
<!-- 设置间隔-->
<div id="dsc" style="font-size:88px;font-family:黑体;"></div>
<!-- 通过style修改标题文字显示属性-->
<div class="space"></div>
<!-- 设置间隔-->
<div id="timer" style="font-size:66px;font-family:宋体;"></div>
<!-- 通过style修改计时文字显示属性-->
</body>
</html>

Comment list( 0 )

You need to Sign in for post a comment

Help Search

Gitee_sixth 5th_float_left_close