打开/关闭菜单
切换首选项菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

测试20:修订间差异

来自珠海交通维基
无编辑摘要
无编辑摘要
第6行: 第6行:


     <div class="zhbus-led-screen">
     <div class="zhbus-led-screen">
       <!-- 24行圆形LED点阵遮罩层 -->
       <!-- 24行精准硬切 LED 点阵遮罩层(消除半亮灯珠) -->
       <div class="zhbus-led-overlay"></div>
       <div class="zhbus-led-overlay"></div>
        
        
第19行: 第19行:


<style>
<style>
/* 样式独立命名,防止干扰 MediaWiki 原有皮肤 */
/* 容器:500px 宽度 */
.zhbus-led-wrapper {
.zhbus-led-wrapper {
   width: 700px;
   width: 500px;
   margin: 15px auto;
   margin: 15px auto;
   box-sizing: border-box;
   box-sizing: border-box;
}
}


/* 700px 宽度电子路牌外壳 */
/* 500px 外壳,高度 70px */
.zhbus-led-casing {
.zhbus-led-casing {
   width: 700px;
   width: 500px;
   height: 96px;
   height: 70px;
   background: linear-gradient(180deg, #23252b 0%, #111215 100%);
   background: linear-gradient(180deg, #23252b 0%, #111215 100%);
   border-radius: 8px;
   border-radius: 6px;
   padding: 10px 14px;
   padding: 8px 10px;
   box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.15);
   box-shadow: 0 6px 16px rgba(0, 0, 0, 0.85), inset 0 1px 1px rgba(255, 255, 255, 0.15);
   border: 2px solid #30333d;
   border: 2px solid #30333d;
   position: relative;
   position: relative;
第39行: 第39行:
}
}


/* 边角螺丝 */
/* 螺丝钉细节 */
.zhbus-screw {
.zhbus-screw {
   position: absolute;
   position: absolute;
   width: 7px;
   width: 5px;
   height: 7px;
   height: 5px;
   background: radial-gradient(circle, #777 30%, #333 80%);
   background: radial-gradient(circle, #777 30%, #333 80%);
   border-radius: 50%;
   border-radius: 50%;
   box-shadow: inset 0 0 1px #000;
   box-shadow: inset 0 0 1px #000;
}
}
.zhbus-screw.tl { top: 5px; left: 5px; }
.zhbus-screw.tl { top: 4px; left: 4px; }
.zhbus-screw.tr { top: 5px; right: 5px; }
.zhbus-screw.tr { top: 4px; right: 4px; }
.zhbus-screw.bl { bottom: 5px; left: 5px; }
.zhbus-screw.bl { bottom: 4px; left: 4px; }
.zhbus-screw.br { bottom: 5px; right: 5px; }
.zhbus-screw.br { bottom: 4px; right: 4px; }


/* LED 显示屏(严格控制 24 行圆形点阵) */
/* 显示屏主区域:高度 50px */
.zhbus-led-screen {
.zhbus-led-screen {
   position: relative;
   position: relative;
   background-color: #050505;
   background-color: #000000;
   border-radius: 4px;
   border-radius: 3px;
   overflow: hidden;
   overflow: hidden;
   border: 2px solid #0a0a0c;
   border: 2px solid #0a0a0c;
   height: 72px;
   height: 50px;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.95);
   box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.98);
}
}


/* 24行圆形颗粒感发光罩层 */
/* 硬边缘点阵遮罩层:0.7px 到 0.75px 极窄过渡,彻底杜绝灯珠亮一半 */
.zhbus-led-overlay {
.zhbus-led-overlay {
   position: absolute;
   position: absolute;
第73行: 第73行:
   pointer-events: none;
   pointer-events: none;
   background-image:  
   background-image:  
     radial-gradient(circle at 1.5px 1.5px, transparent 1.2px, #050505 1.5px),
     radial-gradient(circle at 1.04px 1.04px, transparent 0.7px, #000000 0.75px);
    linear-gradient(to right, rgba(0,0,0,0.85) 1px, transparent 1px),
   background-size: 2.08px 2.08px;
    linear-gradient(to bottom, rgba(0,0,0,0.85) 1px, transparent 1px);
   background-size: 3px 3px, 3px 3px, 3px 3px;
}
}


第87行: 第85行:
}
}


/* 24点阵发光文字 */
/* 专为真 LED 效果优化的字体与高对比度渲染 */
.zhbus-led-text {
.zhbus-led-text {
   font-family: "SimSun", "宋体", STSong, "NSimSun", monospace, serif !important;
   font-family: "SimSun-ExtB", "NSimSun", "SimSun", "Courier New", monospace !important;
   font-size: 56px;
   font-size: 42px;
   font-weight: 900;
   font-weight: 900;
   color: #ffc400;
   color: #ffcc00;
   letter-spacing: 2px;
   letter-spacing: 2px;
   line-height: 72px;
   line-height: 50px;
   padding-right: 60px;
   padding-right: 40px;
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   -webkit-font-smoothing: none;
 
   -moz-osx-font-smoothing: unset;
  /* 强制关闭字体平滑(抗锯齿),还原真实像素点 */
   font-smooth: never;
   -webkit-font-smoothing: none !important;
   text-shadow:
   -moz-osx-font-smoothing: unset !important;
    0 0 1px #ffd000,
   font-smooth: never !important;
    0 0 3px rgba(255, 196, 0, 0.8),
 
    0 0 6px rgba(255, 180, 0, 0.4);
   /* 使用 300% 对比度滤镜进行二值化,使字边缘要么全亮要么完全不亮 */
  filter: contrast(300%) drop-shadow(0 0 1px #ffc400);
}
}


/* ※ 隔开符号 */
/* ※ 间隔符 */
.zhbus-sep {
.zhbus-sep {
   color: #ffc400;
   color: #ffcc00;
   font-size: 48px;
   font-size: 34px;
   margin: 0 10px;
   margin: 0 8px;
   font-weight: bold;
   font-weight: 900;
   text-shadow: 0 0 4px rgba(255, 196, 0, 0.8);
   filter: contrast(300%);
}
}


第135行: 第134行:
     "关于开通高考专线及学生高考免费乘车政策的通告"
     "关于开通高考专线及学生高考免费乘车政策的通告"
   ];
   ];
  async function fetchWithTimeout(resource, options = {}) {
    const { timeout = 3000 } = options;
    const controller = new AbortController();
    const id = setTimeout(() => controller.abort(), timeout);
    const response = await fetch(resource, {
      ...options,
      signal: controller.signal
    });
    clearTimeout(id);
    return response;
  }


   async function initZhbusLed() {
   async function initZhbusLed() {
     let titles = [];
     let titles = [];
     try {
     try {
       const res = await fetch(API_URL);
       const res = await fetchWithTimeout(API_URL, { timeout: 3000 });
      if (!res.ok) throw new Error('网络响应异常');
       const data = await res.json();
       const data = await res.json();
       const items = data.data || data.Data || (data.data && data.data.list) || data;
       const items = data.data || data.Data || (data.data && data.data.list) || data;
       titles = items.map(i => i.Title || i.title).filter(Boolean);
       if (Array.isArray(items)) {
       if (!titles.length) throw new Error();
        titles = items.map(i => i.Title || i.title).filter(Boolean);
      }
       if (!titles.length) throw new Error('解析数据为空');
     } catch(e) {
     } catch(e) {
       titles = FALLBACK;
       titles = FALLBACK;
第160行: 第174行:
     contentClone.innerHTML = fullHtml;
     contentClone.innerHTML = fullHtml;


    // 严格按照【1秒 3 个字】计算滚动时间
     const tempDiv = document.createElement("div");
     const tempDiv = document.createElement("div");
     tempDiv.innerHTML = fullHtml;
     tempDiv.innerHTML = fullHtml;
第169行: 第182行:
   }
   }


   if (document.readyState === 'loading') {
   if (document.readyState === 'complete' || document.readyState === 'interactive') {
    setTimeout(initZhbusLed, 100);
  } else {
     document.addEventListener('DOMContentLoaded', initZhbusLed);
     document.addEventListener('DOMContentLoaded', initZhbusLed);
  } else {
    initZhbusLed();
   }
   }
})();
})();
</script>
</script>
</html>
</html>

2026年7月29日 (三) 09:01的版本

加载中...
加载中...