以下代码可以直接创建一个空的文本文档,复制粘贴后重命名任意.html 双击默认浏览器打开即可
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>倒计时</title>
<style>
#countdown {
margin:auto;
width: 1000px;
height: 300px;
line-height:300px;
background-color: #fff;
color: skyblue;
font-size: 100px;
text-align: center;
padding-top: 75px;+
}
</style>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.2.0/jquery.countdown.min.js"></script>
</head>
<body>
<div id="countdown">WORK OVER</div>
<script>
var endDate = '2023/7/28 21:00:00'; //倒计时结束日期
$('#countdown').countdown(endDate, function(event) {
$(this).html(event.strftime('WORK OVER %H:%M:%S')); //倒计时格式
});
</script>
</body>
</html>
来都来了热心值什么的给点(●'◡'●) |