打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Mobile.css:修订间差异

MediaWiki界面页面
Rockman留言 | 贡献
创建页面,内容为“---------------------------------------------------------- 1. 全局移动端基础 ----------------------------------------------------------:​ body { background: #f5f7fa; font-size: 15px; line-height: 1.72; -webkit-text-size-adjust: 100%; } 防止任何元素撑破屏幕:​ * { max-width: 100%; box-sizing: border-box; } /* ---------------------------------------------------------- 2. 移动端页面标题 --------------------…”
 
Rockman留言 | 贡献
无编辑摘要
第1行: 第1行:
/* ----------------------------------------------------------
/* ----------------------------------------------------------
   1. 全局移动端基础
   1. 顶部导航栏
   ---------------------------------------------------------- */
   ---------------------------------------------------------- */
body {
.navbar, .navbar-default, #mw-navigation .navbar {
   background: #f5f7fa;
   background: #fff;
   font-size: 15px;
   border: none;
   line-height: 1.72;
   border-bottom: 1px solid #e5e7eb;
   -webkit-text-size-adjust: 100%;
   box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
   min-height: 54px;
 
/* 防止任何元素撑破屏幕 */
* {
   max-width: 100%;
  box-sizing: border-box;
}
}


 
.navbar-brand, .navbar-default .navbar-brand {
/* ----------------------------------------------------------
  2. 移动端页面标题
  ---------------------------------------------------------- */
.pre-content h1,
#section_0 h1,
h1.firstHeading {
  font-size: 1.5em;
   font-weight: 800;
   font-weight: 800;
  color: #181e28;
  line-height: 1.3;
  padding: 12px 16px 8px;
  margin: 0;
}
/* ----------------------------------------------------------
  3. 移动端内容卡片化
  ---------------------------------------------------------- */
/* Minerva 的内容区 */
.mw-parser-output {
  padding: 0 4px;
}
/* 章节折叠标题(Minerva 默认折叠章节) */
.section-heading,
.mw-parser-output > .mw-heading2,
.mw-parser-output > h2 {
  background: #ffffff;
  padding: 14px 16px 12px;
  margin: 12px 0 0 0;
  border-radius: 10px 10px 0 0;
  border-bottom: 2px solid #1a6fc4;
   font-size: 1.15em;
   font-size: 1.15em;
  font-weight: 700;
   color: #2d7dd2;
   color: #181e28;
   padding: 14px 12px;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
}
.navbar-brand:hover { color: #1b5eb5; }


/* 章节折叠箭头图标 */
.navbar-nav > li > a, .navbar-default .navbar-nav > li > a {
.section-heading .indicator {
   color: #4b5563;
   color: #1a6fc4;
  font-weight: 500;
  font-size: 0.9em;
  padding: 16px 14px;
  transition: color .15s;
}
}
 
.navbar-nav > li > a:hover,
/* 章节内容块 */
.navbar-default .navbar-nav > li > a:hover,
.mf-section-0,
.navbar-nav > li.active > a {
.mf-section-1,
   color: #2d7dd2;
.mf-section-2,
   background: transparent;
.mf-section-3,
.mf-section-4,
.mf-section-5,
.mf-section-6,
.mf-section-7,
.mf-section-8,
.mf-section-9,
.mf-section-10 {
   background: #ffffff;
   padding: 12px 16px;
  margin: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}
}
 
.navbar-nav > li.active > a {
/* 三级标题 */
   border-bottom: 2px solid #2d7dd2;
.mw-parser-output > h3,
.mw-parser-output > .mw-heading3 {
  font-size: 1em;
  font-weight: 600;
  color: #1a6fc4;
  padding-left: 10px;
   border-left: 3px solid #1a6fc4;
  margin: 16px 0 8px;
}
}


 
.navbar-nav .dropdown-menu {
/* ----------------------------------------------------------
   background: #fff;
  4. 移动端 Infobox:全宽 + 顶部展示
   border: 1px solid #e5e7eb;
  ---------------------------------------------------------- */
.infobox,
.infobox-wrapper {
   float: none;
  width: 100%;
  max-width: 100%;
   margin: 0 0 16px 0;
   border-radius: 10px;
   border-radius: 10px;
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
   box-shadow: 0 8px 24px rgba(0,0,0,0.10);
   font-size: 0.9em;
   padding: 6px 0;
  overflow: hidden;
}
 
/* Infobox 标题 */
.infobox-title,
.infobox caption,
.infobox th[colspan] {
  font-size: 1.1em;
  padding: 12px 14px;
}
}
 
.navbar-nav .dropdown-menu > li > a {
/* Infobox 图片全宽 */
   color: #1a1d24;
.infobox-image img,
   padding: 8px 18px;
.infobox .image-section img {
  width: 100%;
  height: auto;
}
 
/* Infobox 两列布局调整 */
.infobox th {
   width: 32%;
   padding: 7px 10px;
   font-size: 0.88em;
   font-size: 0.88em;
}
}
.infobox td {
.navbar-nav .dropdown-menu > li > a:hover {
   padding: 7px 10px;
   background: #e6f0fb;
   font-size: 0.92em;
   color: #2d7dd2;
}
}


/* ----------------------------------------------------------
/* ----------------------------------------------------------
   5. 移动端表格:横向可滚动
   2. 内容区背景透明(让 Common.css 的卡片样式显露)
   ---------------------------------------------------------- */
   ---------------------------------------------------------- */
 
#content, #mw-content-container, .mw-body {
/* 所有 wikitable 包裹在可滚动容器内 */
   background: transparent;
.wikitable {
   border: none;
  display: block;
   box-shadow: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  font-size: 0.85em;
}
 
.wikitable th {
  padding: 8px 10px;
  font-size: 0.88em;
  white-space: nowrap;
}
 
.wikitable td {
   padding: 7px 10px;
   white-space: normal;
   min-width: 80px;
}
}


/* 表格滚动提示:左侧渐变阴影(暗示可以滑动) */
.skin-chameleon #mw-content-text {
.content-table-wrapper {
   background: transparent;
  position: relative;
}
.content-table-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 24px;
   background: linear-gradient(to right, transparent, rgba(245, 247, 250, 0.8));
  pointer-events: none;
}
}


/* ----------------------------------------------------------
/* ----------------------------------------------------------
   6. 移动端 Navbox
   3. 侧边栏面板
   ---------------------------------------------------------- */
   ---------------------------------------------------------- */
.navbox-wrapper,
.skin-chameleon .panel, .chameleon-sidebar .panel {
.navbox {
   background: #fff;
   font-size: 0.82em;
  border: 1px solid #e5e7eb;
   border-radius: 10px;
  border-radius: 14px;
   margin: 12px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
   margin-bottom: 16px;
   overflow: hidden;
}
}
 
.skin-chameleon .panel-heading, .chameleon-sidebar .panel-heading {
.navbox-title {
   background: #2d7dd2;
   padding: 8px 12px;
   color: #fff;
   font-size: 0.95em;
   font-weight: 600;
}
 
.navbox-group {
   text-align: left;
  padding: 6px 10px;
   font-size: 0.88em;
   font-size: 0.88em;
   white-space: normal;
   padding: 10px 16px;
   width: auto;
   border: none;
}
}
 
.skin-chameleon .panel-body a, .chameleon-sidebar .panel-body a {
.navbox-list {
  color: #4b5563;
   padding: 6px 10px;
  display: block;
   line-height: 2.2; /* 增大行高,方便点击 */
   padding: 6px 16px;
   font-size: 0.86em;
  transition: color .15s, background .15s;
}
}
 
.skin-chameleon .panel-body a:hover, .chameleon-sidebar .panel-body a:hover {
/* Navbox 链接增大点击区域 */
   color: #2d7dd2;
.navbox-list a {
   background: #e6f0fb;
   display: inline-block;
   text-decoration: none;
   padding: 2px 6px;
   margin: 1px 0;
}
}
 
.skin-chameleon .panel-body ul { list-style: none; margin: 0; padding: 0; }
.skin-chameleon .panel-body ul li { border-bottom: 1px solid #f3f4f6; }
.skin-chameleon .panel-body ul li:last-child { border-bottom: none; }


/* ----------------------------------------------------------
/* ----------------------------------------------------------
   7. 移动端人物关系卡片
   4. 页脚
   ---------------------------------------------------------- */
   ---------------------------------------------------------- */
.relation-grid {
footer, #footer, .mw-footer {
   grid-template-columns: repeat(2, 1fr);
   background: #fff;
   gap: 8px;
  border-top: 1px solid #e5e7eb;
}
   padding: 20px 24px;
 
  margin-top: 40px;
.relation-card {
  font-size: 0.8em;
   padding: 10px 8px;
  color: #9ca3af;
   text-align: center;
}
}
 
footer a, #footer a { color: #4b5563; }
.relation-label {
footer a:hover, #footer a:hover { color: #2d7dd2; }
  font-size: 0.72em;
}
 
.relation-name {
  font-size: 0.88em;
}
 


/* ----------------------------------------------------------
/* ----------------------------------------------------------
   8. 移动端目录(右下角浮动按钮)
   5. 页面操作标签(编辑/历史/讨论)
  Minerva 皮肤自带目录按钮,这里只做美化
   ---------------------------------------------------------- */
   ---------------------------------------------------------- */
#toc,
.nav-tabs, #p-views ul {
.toc {
   border-bottom: 1px solid #e5e7eb;
   display: none; /* 隐藏嵌入式目录,用 Minerva 自带的浮动按钮 */
}
}
 
.nav-tabs > li > a, #p-views li a {
/* Minerva 的目录浮动按钮 */
   color: #4b5563;
.toc-button,
   font-size: 0.86em;
.minerva-toc-button {
  padding: 8px 14px;
   background: #1a6fc4;
   color: #ffffff;
   border: none;
   border: none;
   border-radius: 50%;
   border-bottom: 2px solid transparent;
   width: 48px;
   transition: color .15s, border-color .15s;
  height: 48px;
  box-shadow: 0 2px 10px rgba(26, 111, 196, 0.35);
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 100;
  font-size: 1.1em;
}
}
 
.nav-tabs > li > a:hover, #p-views li a:hover {
 
   color: #2d7dd2;
/* ----------------------------------------------------------
   background: transparent;
  9. 移动端分类标签
   border-bottom-color: #2d7dd2;
  ---------------------------------------------------------- */
#catlinks {
   padding: 10px 14px;
   margin: 12px 4px;
   border-radius: 10px;
}
}
 
.nav-tabs > li.active > a, #p-views li.selected a {
#catlinks a {
   color: #2d7dd2;
   padding: 4px 10px;
   font-weight: 600;
   font-size: 0.85em;
  border-bottom-color: #2d7dd2;
   margin: 2px;
   background: transparent;
}
}


/* ----------------------------------------------------------
/* ----------------------------------------------------------
   10. 移动端引用块
   6. 按钮
   ---------------------------------------------------------- */
   ---------------------------------------------------------- */
blockquote,
.btn-primary, .mw-ui-progressive, input[type="submit"] {
.character-quote {
   background: #2d7dd2;
   padding: 12px 14px;
  border: none;
   margin: 12px 0;
  border-radius: 8px;
   font-size: 0.95em;
  color: #fff;
  font-weight: 600;
   padding: 8px 20px;
   font-size: 0.88em;
  transition: background .15s, box-shadow .15s;
}
}
 
.btn-primary:hover, .mw-ui-progressive:hover, input[type="submit"]:hover {
 
   background: #1b5eb5;
/* ----------------------------------------------------------
   box-shadow: 0 2px 8px rgba(45,125,210,0.25);
  11. 移动端图片
  ---------------------------------------------------------- */
.thumb {
   float: none;
   width: 100%;
  max-width: 100%;
  margin: 12px 0;
}
.thumb .thumbinner {
  width: 100% !important;
}
.thumb img {
  width: 100%;
  height: auto;
}
}


 
.btn-default, .mw-ui-quiet {
/* ----------------------------------------------------------
   background: #f3f4f6;
  12. 移动端搜索
   border: 1px solid #e5e7eb;
  ---------------------------------------------------------- */
   border-radius: 8px;
.search-box input,
   color: #4b5563;
#searchInput {
   padding: 8px 20px;
   font-size: 16px; /* 防止 iOS 自动缩放 */
   font-size: 0.88em;
   padding: 10px 16px;
   transition: background .15s;
   border-radius: 100px;
   width: 100%;
}
 
 
/* ----------------------------------------------------------
  13. 移动端触摸优化
  所有可点击元素最小 44px 高度(Apple HIG 标准)
  ---------------------------------------------------------- */
a,
button,
.mw-ui-progressive,
.mw-ui-quiet,
.section-heading {
   min-height: 44px;
   display: inline-flex;
  align-items: center;
}
 
/* 链接在段落中不需要 flex */
p a,
td a,
li a,
.navbox-list a,
#catlinks a,
.mw-parser-output > p a,
.infobox a {
  display: inline;
   min-height: auto;
}
}
 
.btn-default:hover, .mw-ui-quiet:hover {
 
  background: #e6f0fb;
/* ----------------------------------------------------------
  color: #2d7dd2;
  14. 移动端境界进度条
  border-color: #2d7dd2;
  ---------------------------------------------------------- */
.realm-bar {
  height: 8px;
}
}


/* ----------------------------------------------------------
/* ----------------------------------------------------------
   15. 移动端 Tabber 标签页
   7. 编辑页面
   ---------------------------------------------------------- */
   ---------------------------------------------------------- */
.tabber ul.tabbernav {
#editform textarea, .mw-editfont-default {
  overflow-x: auto;
   font-family: "JetBrains Mono", "Fira Code", monospace;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  padding-bottom: 2px;
  display: flex;
}
 
.tabber ul.tabbernav li a {
   padding: 10px 14px;
  white-space: nowrap;
   font-size: 0.88em;
   font-size: 0.88em;
   min-height: 44px;
   border: 1px solid #e5e7eb;
  display: flex;
   border-radius: 10px;
   align-items: center;
}
 
.tabber .tabbertab {
   padding: 14px;
   padding: 14px;
  background: #fff;
  line-height: 1.7;
}
}
 
#editform textarea:focus {
 
   border-color: #2d7dd2;
/* ----------------------------------------------------------
   box-shadow: 0 0 0 3px rgba(45,125,210,0.12);
  16. 移动端剧透折叠块
   outline: none;
  ---------------------------------------------------------- */
.spoiler-box .mw-collapsible-toggle {
   padding: 10px 14px;
  min-height: 44px;
   display: flex;
  align-items: center;
   justify-content: center;
}
}


/* ----------------------------------------------------------
/* ----------------------------------------------------------
   17. 隐藏移动端不需要的元素
   8. Bootstrap 杂项覆盖
   ---------------------------------------------------------- */
   ---------------------------------------------------------- */
.mw-editsection {
.well {
   font-size: 0.7em;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
   box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
}
 
.panel-default > .panel-heading {
/* 如果有广告位,移动端第一屏不显示侧边广告 */
  background: #f3f4f6;
.sidebar-ad {
  border-color: #e5e7eb;
   display: none;
   color: #1a1d24;
}
}


 
/* 副标题 */
/* ----------------------------------------------------------
#contentSub { color: #9ca3af; font-size: 0.82em; margin-bottom: 10px; }
  18. 横屏优化(平板横屏或大屏手机)
#siteSub { color: #9ca3af; font-size: 0.8em; margin-bottom: 10px; }
  ---------------------------------------------------------- */
@media (min-width: 600px) and (max-width: 991px) {
  .relation-grid {
    grid-template-columns: repeat(3, 1fr);
  }
 
  .infobox,
  .infobox-wrapper {
    float: right;
    width: 280px;
    margin: 0 0 16px 16px;
  }
 
  .mf-section-0,
  .mf-section-1,
  .mf-section-2,
  .mf-section-3,
  .mf-section-4,
  .mf-section-5 {
    padding: 14px 20px;
  }
}

2026年6月2日 (二) 20:54的版本

/* ----------------------------------------------------------
   1. 顶部导航栏
   ---------------------------------------------------------- */
.navbar, .navbar-default, #mw-navigation .navbar {
  background: #fff;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  min-height: 54px;
}

.navbar-brand, .navbar-default .navbar-brand {
  font-weight: 800;
  font-size: 1.15em;
  color: #2d7dd2;
  padding: 14px 12px;
}
.navbar-brand:hover { color: #1b5eb5; }

.navbar-nav > li > a, .navbar-default .navbar-nav > li > a {
  color: #4b5563;
  font-weight: 500;
  font-size: 0.9em;
  padding: 16px 14px;
  transition: color .15s;
}
.navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:hover,
.navbar-nav > li.active > a {
  color: #2d7dd2;
  background: transparent;
}
.navbar-nav > li.active > a {
  border-bottom: 2px solid #2d7dd2;
}

.navbar-nav .dropdown-menu {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  padding: 6px 0;
}
.navbar-nav .dropdown-menu > li > a {
  color: #1a1d24;
  padding: 8px 18px;
  font-size: 0.88em;
}
.navbar-nav .dropdown-menu > li > a:hover {
  background: #e6f0fb;
  color: #2d7dd2;
}

/* ----------------------------------------------------------
   2. 内容区背景透明(让 Common.css 的卡片样式显露)
   ---------------------------------------------------------- */
#content, #mw-content-container, .mw-body {
  background: transparent;
  border: none;
  box-shadow: none;
}

.skin-chameleon #mw-content-text {
  background: transparent;
}

/* ----------------------------------------------------------
   3. 侧边栏面板
   ---------------------------------------------------------- */
.skin-chameleon .panel, .chameleon-sidebar .panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  overflow: hidden;
}
.skin-chameleon .panel-heading, .chameleon-sidebar .panel-heading {
  background: #2d7dd2;
  color: #fff;
  font-weight: 600;
  font-size: 0.88em;
  padding: 10px 16px;
  border: none;
}
.skin-chameleon .panel-body a, .chameleon-sidebar .panel-body a {
  color: #4b5563;
  display: block;
  padding: 6px 16px;
  font-size: 0.86em;
  transition: color .15s, background .15s;
}
.skin-chameleon .panel-body a:hover, .chameleon-sidebar .panel-body a:hover {
  color: #2d7dd2;
  background: #e6f0fb;
  text-decoration: none;
}
.skin-chameleon .panel-body ul { list-style: none; margin: 0; padding: 0; }
.skin-chameleon .panel-body ul li { border-bottom: 1px solid #f3f4f6; }
.skin-chameleon .panel-body ul li:last-child { border-bottom: none; }

/* ----------------------------------------------------------
   4. 页脚
   ---------------------------------------------------------- */
footer, #footer, .mw-footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 20px 24px;
  margin-top: 40px;
  font-size: 0.8em;
  color: #9ca3af;
  text-align: center;
}
footer a, #footer a { color: #4b5563; }
footer a:hover, #footer a:hover { color: #2d7dd2; }

/* ----------------------------------------------------------
   5. 页面操作标签(编辑/历史/讨论)
   ---------------------------------------------------------- */
.nav-tabs, #p-views ul {
  border-bottom: 1px solid #e5e7eb;
}
.nav-tabs > li > a, #p-views li a {
  color: #4b5563;
  font-size: 0.86em;
  padding: 8px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-tabs > li > a:hover, #p-views li a:hover {
  color: #2d7dd2;
  background: transparent;
  border-bottom-color: #2d7dd2;
}
.nav-tabs > li.active > a, #p-views li.selected a {
  color: #2d7dd2;
  font-weight: 600;
  border-bottom-color: #2d7dd2;
  background: transparent;
}

/* ----------------------------------------------------------
   6. 按钮
   ---------------------------------------------------------- */
.btn-primary, .mw-ui-progressive, input[type="submit"] {
  background: #2d7dd2;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  padding: 8px 20px;
  font-size: 0.88em;
  transition: background .15s, box-shadow .15s;
}
.btn-primary:hover, .mw-ui-progressive:hover, input[type="submit"]:hover {
  background: #1b5eb5;
  box-shadow: 0 2px 8px rgba(45,125,210,0.25);
}

.btn-default, .mw-ui-quiet {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #4b5563;
  padding: 8px 20px;
  font-size: 0.88em;
  transition: background .15s;
}
.btn-default:hover, .mw-ui-quiet:hover {
  background: #e6f0fb;
  color: #2d7dd2;
  border-color: #2d7dd2;
}

/* ----------------------------------------------------------
   7. 编辑页面
   ---------------------------------------------------------- */
#editform textarea, .mw-editfont-default {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.88em;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  line-height: 1.7;
}
#editform textarea:focus {
  border-color: #2d7dd2;
  box-shadow: 0 0 0 3px rgba(45,125,210,0.12);
  outline: none;
}

/* ----------------------------------------------------------
   8. Bootstrap 杂项覆盖
   ---------------------------------------------------------- */
.well {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.panel-default > .panel-heading {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #1a1d24;
}

/* 副标题 */
#contentSub { color: #9ca3af; font-size: 0.82em; margin-bottom: 10px; }
#siteSub { color: #9ca3af; font-size: 0.8em; margin-bottom: 10px; }