console
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: linear-gradient(135deg, #ffe6f2, #cce7ff);
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
font-family: '微软雅黑', sans-serif;
}
#countdown {
font-size: 3vw;
color: #2c3e50;
text-align: center;
}
#message {
display: none;
background: rgba(255,255,255,0.9);
padding: 2rem;
border-radius: 15px;
box-shadow: 0 0 20px rgba(0,0,0,0.1);
max-width: 400px;
line-height: 1.6;
}
li {
text-align: left;
margin: 0.8rem 0;
}
</style>
</head>
<body>
<div id="countdown"></div>
<div id="message">
<strong>恩琪:</strong><br>
<span style="font-size:1.2em">15岁生日快乐!��</span><br><br>
愿新的一岁:<br>
<ul>
<li>数学题永远解得开</li>
<li>跑800米时风会推你一把</li>
<li>冰淇凌永远不化在手心</li>
<li>晚自习窗外的晚霞格外好看</li>
</ul>
</div>
<script>
const targetDate = new Date('2025-05-03T00:00:00');
function updateTimer() {
const now = new Date();
const diff = targetDate - now;
if (diff <= 0) {
clearInterval(timer);
document.getElementById('countdown').style.display = 'none';
document.getElementById('message').style.display = 'block';
return;
}
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
document.getElementById('countdown').innerHTML = `
<div>${days} 天</div>
<div>${hours.toString().padStart(2, '0')} :
${minutes.toString().padStart(2, '0')} :
${seconds.toString().padStart(2, '0')}</div>
<div style="font-size:0.6em">距离特别时刻</div>
`;
}
const timer = setInterval(updateTimer, 1000);
updateTimer();
</script>
</body>
</html>