Month End Sales
A collection page of Baofeng
About
⚡ MONTH-END SALE ENDS IN: 00 DAYS : 00 HOURS : 00 MINS : 00 SECS /* 1. 整体容器:暗色背景增强硬朗感与对比度 */ .timer-container { background-color: #1a1a1a; /* 背景色:深黑/碳灰 */ padding: 20px 15px; border-radius: 8px; text-align: center; max-width: 600px; margin: 20px auto; font-family: Arial, Helvetica, sans-serif; /* 选用清晰无衬线字体 */ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); } /* 2. 标题样式 */ .timer-title { color: #ffcc00; /* 标题颜色:警示黄/金黄 */ font-size: 18px; /* 标题字号 */ font-weight: 700; letter-spacing: 1px; margin-bottom: 12px; } /* 3. 倒计时数字盒子外框 */ .countdown-wrapper { display: flex; justify-content: center; align-items: center; gap: 8px; } .time-block { background-color: #2b2b2b; /* 数字框背景 */ border: 1px solid #444444; /* 边框增加质感 */ border-radius: 6px; padding: 10px 12px; min-width: 65px; display: flex; flex-direction: column; align-items: center; } /* 4. 数字大小与颜色(重点优化处) */ .time-number { color: #ffffff; /* 数字颜色:纯白(清晰度最高) */ font-size: 32px; /* ★ 修改这里改变数字大小 ★ */ font-weight: 800; line-height: 1; font-family: 'Courier New', Courier, monospace; /* 等宽字体,数字变化时不抖动 */ } /* 5. 标签大小与颜色(DAYS, HOURS等) */ .time-label { color: #a0a0a0; /* 标签颜色:浅灰色 */ font-size: 11px; /* 标签字号 */ font-weight: 600; margin-top: 6px; letter-spacing: 0.5px; } /* 6. 冒号分隔符 */ .time-separator { color: #ffcc00; /* 冒号颜色 */ font-size: 28px; font-weight: bold; margin-bottom: 12px; } /* 📱 移动端自适应 */ @media (max-width: 480px) { .time-number { font-size: 24px; /* 手机端调小数字避免溢出 */ } .time-block { min-width: 50px; padding: 8px 6px; } .time-separator { font-size: 20px; } } // 1. 设置带时区的截止时间(此处 -07:00 代表美西 PDT 时区) const targetDate = new Date("2026-07-31T23:59:59-07:00").getTime(); const updateCountdown = () => { // new Date().getTime() 永远返回全球统一的毫秒时间戳,无需额外处理时区 const now = new Date().getTime(); const difference = targetDate - now; if (difference > 0) { const days = Math.floor(difference / (1000 * 60 * 60 * 24)); const hours = Math.floor((difference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const minutes = Math.floor((difference % (1000 * 60 *