fix: 修改央视

This commit is contained in:
zhangds 2024-03-25 19:57:57 +08:00
parent d074365d4f
commit 4d9236b46f
2 changed files with 6 additions and 3 deletions

View File

@ -46,7 +46,7 @@ const getQueryString = (name) => {
* @returns * @returns
*/ */
const pageOutTime = (timestamp) => { const pageOutTime = (timestamp) => {
if (timestamp) { if (timestamp || timestamp === "0") {
const now = new Date().getTime(); // 获取当前时间的时间戳 const now = new Date().getTime(); // 获取当前时间的时间戳
let diff = Number(timestamp) - now; // 计算差异(以毫秒为单位) let diff = Number(timestamp) - now; // 计算差异(以毫秒为单位)

View File

@ -129,11 +129,14 @@ a {
.countdown { .countdown {
position: absolute; position: absolute;
top: 2.4%; top: 50%;
left: 7%; left: 50%;
display: flex; display: flex;
align-items: center; align-items: center;
color: #fff; color: #fff;
z-index: 999;
/* 使用transform属性进行微调确保完全居中 */
transform: translate(-50%, -50%);
} }
.countdown p { .countdown p {