-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpe.html
More file actions
91 lines (83 loc) · 2.04 KB
/
Copy pathpe.html
File metadata and controls
91 lines (83 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>⚠️没有时间了!</title>
<style>
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #0f2027, #2c5364);
color: #fff;
font-family: "Microsoft YaHei", sans-serif;
text-align: center;
}
.container {
padding: 50px;
border-radius: 20px;
background: rgba(255,255,255,0.05);
box-shadow: 0 0 30px rgba(0,0,0,0.4);
}
h1 {
margin-bottom: 20px;
font-size: 34px;
}
.time {
font-size: 52px;
letter-spacing: 2px;
}
.alert {
font-size: 64px;
color: #ff4d4f;
font-weight: bold;
animation: blink 1s infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
.sub {
margin-top: 20px;
font-size: 18px;
opacity: 0.85;
}
</style>
</head>
<body>
<div class="container">
<h1>2026届初中体育中考已经结束了</h1>
<div class="time" id="countdown">计算中...</div>
<div class="sub">4月27,四月28 12:40</div>
</div>
<script>
function getTargetTime() {
let now = new Date();
let target = new Date();
// 今天 13:30
target.setHours(12, 40, 0, 0);
return target;
}
function updateCountdown() {
let now = new Date();
let target = getTargetTime();
let diff = target - now;
let display = document.getElementById("countdown");
if (diff <= 0) {
display.className = "alert";
display.innerHTML = "⚠️没有时间了!";
return;
}
let hours = Math.floor(diff / (1000 * 60 * 60));
let minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
let seconds = Math.floor((diff % (1000 * 60)) / 1000);
display.innerHTML =
hours + " + minutes + "" + seconds + "";
}
setInterval(updateCountdown, 1000);
updateCountdown();
</script>
</body>
</html>