弹窗之大尺寸

弹窗可以用来书写公告

以下是代码

inject:
head:
# 自定义css
# -

bottom:
# 自定义js
# -
# 下面是你需要添加的代码 (注意使用 | 和正确的缩进)
- |

  <!-- Promotion Popup CSS -->
  <style>
    .popup-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.6); /* 半透明黑色遮罩 */
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000; /* 确保在顶层 */
    }
    .popup-content {
      background-color: #fff;
      padding: 20px;
      border-radius: 10px;
      position: relative;
      width: 80%; /* 弹窗宽度 */
      max-width: 600px; /* 最大宽度 */
      box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    }
    .popup-close {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 24px;
      font-weight: bold;
      color: #aaa;
      cursor: pointer;
    }
    .popup-close:hover {
      color: #333;
    }
    /* 确保 iframe 正常显示 */
    .popup-content iframe {
      display: block;
    }
  </style>

  <!-- Promotion Popup JavaScript -->
  <script>
    function showPromotionPopup() {
      // 检查是否为首页 (根据你的网站结构,'/' 可能需要调整)
      if (window.location.pathname === '/' || window.location.pathname === '/index.html') {
        // (可选) 检查 Cookie 或 LocalStorage,看是否已经显示过
        // if (!localStorage.getItem('promotionPopupShown')) {
             var popup = document.getElementById('promotion-popup');
             if (popup) {
               popup.style.display = 'flex'; // 显示弹窗
               // (可选) 设置标记,表示已显示过
               // localStorage.setItem('promotionPopupShown', 'true');
             }
        // }
      }
    }

    function closePromotionPopup() {
      var popup = document.getElementById('promotion-popup');
      if (popup) {
        popup.style.display = 'none'; // 隐藏弹窗
      }
    }

    // 页面加载完成后执行
    window.addEventListener('load', showPromotionPopup);

    // 点击遮罩层关闭弹窗 (可选)
    // var overlay = document.getElementById('promotion-popup');
    // if (overlay) {
    //   overlay.addEventListener('click', function(event) {
    //     if (event.target === overlay) { // 确保点击的是遮罩本身,而不是内容区域
    //       closePromotionPopup();
    //     }
    //   });
    // }
  </script>

CDN

… 后面的 CDN 配置保持不变 …

[up主专用,视频内嵌代码贴在这]