跳转到内容
打开/关闭菜单
  • 451 条目
  • 806 文件
  • 22 用户
  • 9167 编辑
Blockland Wiki
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模板:PageBanner:修订间差异

来自Blockland Wiki
ETTW​(留言 | 贡献)
无编辑摘要
标签:已被回退
ETTW​(留言 | 贡献)
小 已还原ETTW(讨论)的编辑至最后由KK修订的版本
标签:回退
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
<div class="page-banner noexcerpt" id="mainBanner" style="position: absolute; top: 0; left: 0; width: 100vw; z-index: 100; margin: 0 !important;">
<div class="page-banner-active noexcerpt"></div>
     <div class="page-banner-bg" style="background-image: url('{{{image|{{{1|https://cdn.jsdelivr.net/gh/KKBlockE/BlocklandPicturebed@main/main/20260130095720051.png}}}}}}'); background-size: cover; background-position: center center; width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: 0;"></div>
 
{{#tag:html|
<div class="page-banner noexcerpt">
    <!-- 有了 html 标签护体,MediaWiki 绝对拦不住 background-image,再也不会变棍母了! -->
     <div class="page-banner-bg" style="background-image: url('{{{image|{{{1|https://cdn.jsdelivr.net/gh/KKBlockE/BlocklandPicturebed@main/main/20260130095720051.png}}}}}}');"></div>
      
      
     <div class="page-banner-content" style="position: relative; text-align: center; padding: 150px 20px; z-index: 2;">
     <div class="page-banner-content">
         <div class="page-banner-local" style="font-size: 3.6em; font-weight: bold; text-shadow: 2px 2px 5px rgba(0,0,0,0.6); line-height: 1.2;">{{{local|{{PAGENAME}}}}}</div>
         <div class="page-banner-local" style="font-size: 3.6em; font-weight: bold; text-shadow: 2px 2px 5px rgba(0,0,0,0.6); line-height: 1.2;">{{{local|{{PAGENAME}}}}}</div>
         <div class="page-banner-en" style="font-size: 1.8em; opacity: 0.9; text-shadow: 1px 1px 4px rgba(0,0,0,0.6); margin-top: 5px;">{{{en|}}}</div>
         <div class="page-banner-en" style="font-size: 1.8em; opacity: 0.9; text-shadow: 1px 1px 4px rgba(0,0,0,0.6); margin-top: 5px;">{{{en|}}}</div>
     </div>
     </div>
</div>
</div>
<script>
}}
    (function() {
        var banner = document.getElementById('mainBanner');
        if (banner) {
            var height = banner.offsetHeight;
            // 为 banner 的下一个兄弟元素(或父级内的第一个内容块)添加上边距,避免内容被遮挡
            var next = banner.nextElementSibling;
            if (next && next.style) {
                next.style.marginTop = height + 'px';
            } else {
                var parent = banner.parentNode;
                if (parent && parent.style) {
                    parent.style.paddingTop = height + 'px';
                }
            }
        }
    })();
</script>

2026年5月9日 (六) 23:13的最新版本

PageBanner