MediaWiki:Common.css:修订间差异

来自门球百科
跳到导航跳到搜索
还没有登录门球网账号?使用门球网账号登录,登录后即可编辑词条。
我是门球​(留言 | 贡献)
无编辑摘要
Menqiu​(留言 | 贡献)
中窄屏时顶部导航字号微调,保证
 
(未显示2个用户的7个中间版本)
第80行: 第80行:
}
}
/* ===== 全局导航栏位置优化:挪到第一行 ===== */
/* ===== 全局导航栏位置优化:挪到第一行 ===== */
/* 优化导航位置 */
div[id="mq-global-header"] {
    margin-top: -10px;
    margin-bottom: 10px;
}
/* 首页特殊处理 */
.page-首页 #firstHeading,
.page-首页 #siteSub {
    display: none;
}
.branding-box > a{background-image:url(https://www.menqiu.com/baike/resources/assets/menqiu-long-wiki.png) !important;}
/* ============================================================
  面向老年读者:整体字号放大(2026-10-22)
  说明:本站访客以老年人为主,统一放大正文、表格、导航与侧栏字号,
  并加大行高与表格内边距,提升可读性。
  ============================================================ */
/* 基础字号与行高 */
html { font-size: 18px !important; }
body {
  font-size: 18px !important;
  line-height: 1.8 !important;
}
/* 正文内容 */
.mw-parser-output { font-size: 18px !important; line-height: 1.85 !important; }
.mw-parser-output p,
.mw-parser-output li,
.mw-parser-output dd,
.mw-parser-output dt,
.mw-parser-output blockquote,
.mw-parser-output center {
  font-size: 18px !important;
  line-height: 1.85 !important;
}
/* 标题 */
#firstHeading,
.mw-parser-output h1 {
  font-size: 32px !important;
  line-height: 1.4 !important;
}
.mw-parser-output h2 {
  font-size: 26px !important;
  line-height: 1.5 !important;
  margin-top: 0.9em !important;
  margin-bottom: 0.5em !important;
}
.mw-parser-output h3 {
  font-size: 21px !important;
  line-height: 1.5 !important;
}
.mw-parser-output h4 {
  font-size: 19px !important;
  line-height: 1.6 !important;
}
/* 表格:字号略小,但加大单元格留白 */
.mw-parser-output table {
  font-size: 17px !important;
  line-height: 1.65 !important;
}
.mw-parser-output th,
.mw-parser-output td {
  padding: 0.55em 0.7em !important;
}
/* 页面顶部“门球百科导航”框 */
.menqiu-nav {
  font-size: 17px !important;
  line-height: 2 !important;
}
.menqiu-nav a { font-size: 17px !important; }
/* 左侧栏(MonoBook 等有侧栏的皮肤) */
#column-one { font-size: 16px !important; }
#column-one a,
#column-one li,
#column-one h3,
#column-one .pBody {
  font-size: 16px !important;
  line-height: 1.9 !important;
}
/* 页面顶部页签与个人工具 */
#p-cactions li a,
#p-personal li a,
.skin-monobook #p-cactions li a {
  font-size: 16px !important;
}
/* 搜索框与按钮 */
#searchInput,
input.searchButton,
#mw-searchButton {
  font-size: 16px !important;
}
input, select, textarea, button {
  font-size: 16px !important;
}


/* 1. 减少正文区域上方的默认边距,让内容(包括导航栏)整体上移 */
/* 目录 */
#content, .mw-body {
.toc, #toc {
    padding-top: 0 !important;
  font-size: 17px !important;
    margin-top: 0 !important;
  line-height: 1.8 !important;
}
}


/* 2. 针对 HeaderFooter 注入的导航栏进行定位 */
/* 图片说明文字 */
/* 注意:这里使用了你之前代码中的 div 特征 */
.thumbcaption, .mw-file-description {
div[style*="border-top:1px solid #ccc"],
  font-size: 16px !important;
div[style*="border-top:2px solid #005a32"] {
    margin-top: -10px !important; /* 向上微调,抵消系统留白 */
    margin-bottom: 15px !important;
    position: relative;
    z-index: 100;
}
}


/* 3. 如果是在首页,因为标题已经隐藏,我们需要确保导航栏紧贴 Logo 区域 */
/* 顶部登录提示条 */
body.page-首页 #bodyContent {
.mq-sso-loginbar {
    margin-top: -20px !important;
  font-size: 17px !important;
  line-height: 1.7 !important;
}
}


/* 4. 调大非首页页面的标题间距,防止标题盖住导航栏 */
/* 中窄屏(笔记本)时顶部导航整行略缩小,保证“返回中国门球网”留在同一行末尾 */
body:not(.page-首页) #firstHeading {
@media (max-width: 1400px) {
    margin-top: 15px !important;
  .menqiu-nav { font-size: 15px !important; line-height: 1.9 !important; }
  .menqiu-nav a { font-size: 15px !important; }
}
}

2026年10月22日 (四) 13:16的最新版本

/* 这里放置的CSS将应用于所有皮肤 */
/* ===== 首页:隐藏页面标题 + “首页/讨论”等标签 ===== */
body.page-首页 #firstHeading { display: none !important; }
body.page-首页 #siteSub,
body.page-首页 #contentSub { display: none !important; }

/* namespaces / views tabs(不同皮肤可能不同,先写通用的) */
body.page-首页 #p-namespaces,
body.page-首页 #p-views { display: none !important; }

/* Vector 2022/部分新皮肤的 tabs 工具条 */
body.page-首页 .vector-page-titlebar,
body.page-首页 .vector-page-toolbar,
body.page-首页 .vector-menu-tabs,
body.page-首页 .vector-menu-tabs-container { display: none !important; }

/* ===== 首页:隐藏“编辑/编辑源代码”入口(只影响首页) ===== */
body.page-首页 .mw-editsection,
body.page-首页 .mw-editsection-like {
  display: none !important;
}

/* 一些皮肤会把页面顶部也放一个“编辑”入口(工具栏里) */
body.page-首页 #ca-edit,
body.page-首页 #ca-ve-edit,
body.page-首页 #ca-editsource,
body.page-首页 .mw-portlet-views,
body.page-首页 .vector-menu-tabs {
  display: none !important;
}

/* ===== 首页:去掉标题下方那条横线/上边框(只影响首页) ===== */
/* 常见皮肤:内容区顶部边框或标题下分割线 */
body.page-首页 .mw-body-content,
body.page-首页 #content,
body.page-首页 .mw-body {
  border-top: none !important;
}

/* 有的皮肤用 hr 或 firstHeading 的下边框 */
body.page-首页 hr,
body.page-首页 #firstHeading {
  border-bottom: none !important;
}

/* ===== 首页:去掉“门球百科”这一行(页面标题)和下面的横线 ===== */

/* 1) 直接隐藏页面标题(firstHeading)——不依赖皮肤 */
body.page-首页 h1#firstHeading,
body.page-首页 .mw-first-heading,
body.page-首页 .firstHeading {
  display: none !important;
}

/* 2) 有些皮肤把横线画在标题容器或内容容器上,逐个干掉 */
body.page-首页 #contentSub,
body.page-首页 #siteSub {
  display: none !important;
}

/* 标题区域的分割线/边框(Vector/其它皮肤通用兜底) */
body.page-首页 .mw-body h1,
body.page-首页 .mw-body .mw-first-heading,
body.page-首页 .mw-body #firstHeading {
  border-bottom: none !important;
  box-shadow: none !important;
  background-image: none !important;
}

/* 有些皮肤是在内容区顶端画一条线 */
body.page-首页 .mw-body,
body.page-首页 .mw-body-content,
body.page-首页 #content {
  border-top: none !important;
}

/* 如果那条线其实是 hr */
body.page-首页 hr {
  display: none !important;
}
/* ===== 全局导航栏位置优化:挪到第一行 ===== */
/* 优化导航位置 */
div[id="mq-global-header"] {
    margin-top: -10px;
    margin-bottom: 10px;
}

/* 首页特殊处理 */
.page-首页 #firstHeading, 
.page-首页 #siteSub {
    display: none;
}
.branding-box > a{background-image:url(https://www.menqiu.com/baike/resources/assets/menqiu-long-wiki.png) !important;}

/* ============================================================
   面向老年读者:整体字号放大(2026-10-22)
   说明:本站访客以老年人为主,统一放大正文、表格、导航与侧栏字号,
   并加大行高与表格内边距,提升可读性。
   ============================================================ */

/* 基础字号与行高 */
html { font-size: 18px !important; }
body {
  font-size: 18px !important;
  line-height: 1.8 !important;
}

/* 正文内容 */
.mw-parser-output { font-size: 18px !important; line-height: 1.85 !important; }
.mw-parser-output p,
.mw-parser-output li,
.mw-parser-output dd,
.mw-parser-output dt,
.mw-parser-output blockquote,
.mw-parser-output center {
  font-size: 18px !important;
  line-height: 1.85 !important;
}

/* 标题 */
#firstHeading,
.mw-parser-output h1 {
  font-size: 32px !important;
  line-height: 1.4 !important;
}
.mw-parser-output h2 {
  font-size: 26px !important;
  line-height: 1.5 !important;
  margin-top: 0.9em !important;
  margin-bottom: 0.5em !important;
}
.mw-parser-output h3 {
  font-size: 21px !important;
  line-height: 1.5 !important;
}
.mw-parser-output h4 {
  font-size: 19px !important;
  line-height: 1.6 !important;
}

/* 表格:字号略小,但加大单元格留白 */
.mw-parser-output table {
  font-size: 17px !important;
  line-height: 1.65 !important;
}
.mw-parser-output th,
.mw-parser-output td {
  padding: 0.55em 0.7em !important;
}

/* 页面顶部“门球百科导航”框 */
.menqiu-nav {
  font-size: 17px !important;
  line-height: 2 !important;
}
.menqiu-nav a { font-size: 17px !important; }

/* 左侧栏(MonoBook 等有侧栏的皮肤) */
#column-one { font-size: 16px !important; }
#column-one a,
#column-one li,
#column-one h3,
#column-one .pBody {
  font-size: 16px !important;
  line-height: 1.9 !important;
}

/* 页面顶部页签与个人工具 */
#p-cactions li a,
#p-personal li a,
.skin-monobook #p-cactions li a {
  font-size: 16px !important;
}

/* 搜索框与按钮 */
#searchInput,
input.searchButton,
#mw-searchButton {
  font-size: 16px !important;
}
input, select, textarea, button {
  font-size: 16px !important;
}

/* 目录 */
.toc, #toc {
  font-size: 17px !important;
  line-height: 1.8 !important;
}

/* 图片说明文字 */
.thumbcaption, .mw-file-description {
  font-size: 16px !important;
}

/* 顶部登录提示条 */
.mq-sso-loginbar {
  font-size: 17px !important;
  line-height: 1.7 !important;
}

/* 中窄屏(笔记本)时顶部导航整行略缩小,保证“返回中国门球网”留在同一行末尾 */
@media (max-width: 1400px) {
  .menqiu-nav { font-size: 15px !important; line-height: 1.9 !important; }
  .menqiu-nav a { font-size: 15px !important; }
}