打开/关闭搜索
搜索
打开/关闭菜单
416
745
21
8K
Blockland Wiki
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
上传文件
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
创建账号
登录
查看“︁模板:PageBanner/styles.css”︁的源代码
来自Blockland Wiki
查看
阅读
查看源代码
查看历史
associated-pages
模板
讨论
更多操作
←
模板:PageBanner/styles.css
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
/* --- 1. 隐藏 Citizen 原生标题 --- */ .mw-body-header { display: none !important; } /* --- 2. Banner 主容器 --- */ .page-banner { position: relative; /* 高度 */ height: 450px; /* 抵消顶部边距 */ margin-top: -1.5rem; margin-bottom: 2rem; z-index: 1; } /* --- 3. 背景层(修正版) --- */ .page-banner-bg { position: absolute; top: 0; height: 100%; /* 逃逸逻辑:撑满屏幕 */ width: 100vw; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; background-size: cover; background-position: center; z-index: -1; } /* === 核心修复:用伪元素模拟“渐隐遮罩” === */ /* 这一层盖在图片上,从透明渐变到页面背景色 */ .page-banner-bg::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; /* Citizen 皮肤变量:--color-surface-1 是正文背景色 */ /* 意思是:上部透明,下部渐变到背景色,实现“融入”效果 */ background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, var(--color-surface-1, #ffffff) 100%); } /* --- 4. 内容层 --- */ .page-banner-content { position: relative; height: 100%; max-width: 100%; display: flex; flex-direction: column; justify-content: flex-end; /* 靠下 */ align-items: flex-start; /* 靠左 */ padding-bottom: 80px; z-index: 2; } /* --- 5. 文字样式 --- */ .page-banner-local { font-family: 'Linux Libertine', 'Georgia', serif; font-size: 4em; font-weight: 900; color: #ffffff; line-height: 1.1; margin: 0; /* 加强阴影,防止在浅色图上看不清 */ text-shadow: 0 4px 15px rgba(0,0,0,0.8); } .page-banner-en { font-family: sans-serif; font-size: 1.8em; font-weight: 300; color: rgba(255, 255, 255, 0.95); margin-top: 5px; letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 2px 5px rgba(0,0,0,0.9); } /* 移动端适配 */ @media screen and (max-width: 720px) { .page-banner { height: 300px; } .page-banner-local { font-size: 2.5em; } .page-banner-en { font-size: 1.2em; } }
返回
模板:PageBanner/styles.css
。
查看“︁模板:PageBanner/styles.css”︁的源代码
来自Blockland Wiki