|
|
| (未显示同一用户的5个中间版本) |
| 第1行: |
第1行: |
| /* --- 1. 隐藏原生页面标题 --- */
| |
| /* 只要使用了这个模板,页面原本的标题栏就会消失 */
| |
| .mw-body-header {
| |
| display: none !important;
| |
| }
| |
|
| |
|
| /* --- 2. Hero Banner 容器 --- */
| |
| .citizen-hero {
| |
| /* 关键:使用负边距抵消 Citizen 默认的内容内边距,实现“全宽” */
| |
| /* 注意:如果你的 Citizen 版本不同,可能需要微调 -1.5rem 这个数值 */
| |
| margin-top: -1.5rem;
| |
| margin-left: -1.5rem;
| |
| margin-right: -1.5rem;
| |
|
| |
| /* 高度设置:默认占屏幕高度的 55%,保证冲击力 */
| |
| height: 55vh;
| |
| min-height: 400px;
| |
|
| |
| position: relative;
| |
| background-size: cover;
| |
| background-position: center center;
| |
| background-repeat: no-repeat;
| |
|
| |
| /* 弹性布局:让文字死死地居中 */
| |
| display: flex;
| |
| align-items: center;
| |
| justify-content: center;
| |
|
| |
| /* 底部留点白,别让正文贴着图 */
| |
| margin-bottom: 2rem;
| |
|
| |
| /* 圆角处理:如果你喜欢直角就设为0 */
| |
| border-radius: 0 0 4px 4px;
| |
| overflow: hidden;
| |
| }
| |
|
| |
| /* --- 3. 视觉遮罩 (Overlay) --- */
| |
| /* 加一层半透明黑,防止背景太花看不清字 */
| |
| .citizen-hero::before {
| |
| content: '';
| |
| position: absolute;
| |
| top: 0; left: 0; right: 0; bottom: 0;
| |
| background: rgba(0, 0, 0, 0.25); /* 0.25 是透明度,可自己改 */
| |
| z-index: 1;
| |
| }
| |
|
| |
| /* --- 4. 只有大标题 --- */
| |
| .citizen-hero-text {
| |
| position: relative;
| |
| z-index: 2; /* 保证文字在遮罩上面 */
| |
| text-align: center;
| |
| padding: 0 20px;
| |
| width: 100%;
| |
| }
| |
|
| |
| .citizen-hero h1 {
| |
| color: #ffffff;
| |
| /* 选用衬线体更有“国家/历史”的厚重感 */
| |
| font-family: 'Linux Libertine', 'Georgia', serif;
| |
| font-size: 4rem; /* 字号巨大 */
| |
| font-weight: 700;
| |
| line-height: 1.2;
| |
| margin: 0;
| |
| padding: 0;
| |
| border: none;
| |
| text-shadow: 0 4px 12px rgba(0,0,0,0.6); /* 强阴影,提升易读性 */
| |
| letter-spacing: 0.05em;
| |
| }
| |
|
| |
| /* --- 5. 移动端适配 --- */
| |
| @media screen and (max-width: 720px) {
| |
| .citizen-hero {
| |
| height: 40vh; /* 手机上矮一点 */
| |
| margin-left: -1rem; /* 手机版 Citizen padding 通常变小 */
| |
| margin-right: -1rem;
| |
| }
| |
| .citizen-hero h1 {
| |
| font-size: 2.5rem; /* 手机上字号减小 */
| |
| }
| |
| }
| |