最近从哪吒监控迁移到了 Komari 探针面板,受到群友页脚滚动横幅美化组件的启发,折腾了一个探针页脚赞助美化 css 组件。

css 代码

<style>
  :root{
    --bm-bg: rgba(255,255,255,.75);  /* 背景(浅色) */
    --bm-bg-dark: rgba(20,20,20,.65);/* 背景(深色) */
  }

  /* 定义一个延迟淡入的动画 */
  @keyframes fadeInDelayed {
    0% {
      opacity: 0;
    }
    80% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  /* --- 修改部分 --- */
  /* 包裹 */
  .bm-wrap{
    width: 100%;
    margin: 40px auto 20px;
    display: flex;
    justify-content: center;
    /* 移除这里的 animation */
  }

  /* 胶囊条 */
  .bottom-marquee{
    width: min(92vw, 980px);
    height: 42px;
    border-radius: 999px;
    padding: 0 16px;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
    pointer-events: auto;
    background:
      var(--bm-bg) padding-box,
      linear-gradient(90deg,#ff3b30,#ffcc00,#34c759,#007aff,#ff3b30) border-box;
    border: 2px solid transparent;
    background-repeat: no-repeat;
    background-size: auto, 200% 100%;
    /* 将边框动画和延迟淡入动画合并 */
    animation: 
      bm-border 6s linear infinite,
      fadeInDelayed 2s ease-out forwards;
  }
  /* --- 修改结束 --- */

  /* 渐变边框动画 */
  @keyframes bm-border{
    0%   { background-position: 0 0,   0% 0; }
    100% { background-position: 0 0, 200% 0; }
  }

  /* 深色模式 */
  .dark .bottom-marquee{ background: var(--bm-bg-dark); border-color: transparent; }

  /* 内容轨道 */
  .bm-track{
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }
  
  /* 实现内容不足时自动居中 */
  .bm-track::before,
  .bm-track::after {
    content: '';
    flex-grow: 1;
  }

  /* 隐藏所有浏览器上的滚动条 */
  .bm-track::-webkit-scrollbar { display: none; }
  .bm-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* 单条消息样式 */
  .bm-item{
    font-weight: 600;
    font-size: 14px;
    line-height: 42px;
    opacity: .95;
    display: flex;
    align-items: center;
    white-space: nowrap;
  }
  
  /* 包裹图片的链接样式 */
  .bm-item a {
    flex-shrink: 0;
  }

  /* Logo 图片样式 */
  .logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    margin: 0 5px;
  }

  /* 移动端细调 */
  @media (max-width: 640px){
    .bottom-marquee{ height: 38px; }
    
    .bottom-marquee::before,
    .bottom-marquee::after {
      content: '';
      position: absolute;
      top: 0;
      bottom: 0;
      width: 24px;
      pointer-events: none;
      z-index: 2;
    }
    .bottom-marquee::before {
      left: 0;
      background: linear-gradient(to right, var(--bm-bg), transparent);
    }
    .bottom-marquee::after {
      right: 0;
      background: linear-gradient(to left, var(--bm-bg), transparent);
    }
    .dark .bottom-marquee::before {
      background: linear-gradient(to right, var(--bm-bg-dark), transparent);
    }
    .dark .bottom-marquee::after {
      background: linear-gradient(to left, var(--bm-bg-dark), transparent);
    }

    .bm-item{ font-size: 13px; line-height: 38px; }
    .logo { height: 24px; }
    .bm-wrap{ bottom: 10px; }
  }
</style>

<div class="bm-wrap">
  <div class="bottom-marquee" role="region" aria-label="赞助商">
    <div class="bm-track">
      <span class="bm-item">
        感谢
        <a href="https://cdn.sharon.io/aff.php?aff=1" target="_blank" rel="noopener noreferrer"><img src="https://s2.loli.net/2025/09/15/6YUnFgXtlxbE1SW.png" alt="Sharon Logo" class="logo"></a>
        <a href="https://gomami.io/aff.php?aff=58" target="_blank" rel="noopener noreferrer"><img src="https://s2.loli.net/2025/09/15/lnExAJqwKrNLevI.png" alt="GoMami Logo" class="logo"></a>
        <a href="https://yxvm.com/aff.php?aff=862" target="_blank" rel="noopener noreferrer"><img src="https://s2.loli.net/2025/09/15/oDBpSkvYZCahGJf.png" alt="YXVM Logo" class="logo"></a>
        <a href="https://cloud.isif.net/login?affiliation_code=ryanz" target="_blank" rel="noopener noreferrer"><img src="https://s2.loli.net/2025/09/15/Gmj3t8qdTxc6EOi.png" alt="ISIF Logo" class="logo"></a>
        <a href="https://fxtransit.io/aff.php?aff=5" target="_blank" rel="noopener noreferrer"><img src="https://s2.loli.net/2025/09/15/wkoPZV6eCgdzJif.png" alt="FxTransit Logo" class="logo"></a>
        的赞助支持!
      </span>
    </div>
  </div>
</div>

使用效果

桌面版
赞助商css-01.png

手机版(可触摸滑动)
赞助商css-02.jpg

赞助商css-03.jpg

代码是纯 css,理论上 Komari 探针和哪吒监控都适用,复制完整代码添加到哪吒面板或 Komari 探针的后台自定义 css 区域保存即可生效。以上 Logo 图片可以自行替换图床链接,图片 aff 链接同样自行修改替换即可。

Komari 探针推荐配合 PurCarte 主题食用效果更佳:
https://github.com/Montia37/komari-theme-purcarte