MediaWiki:Common.css:修订间差异
来自神国反恶俗
跳到导航跳到搜索
无编辑摘要 |
无编辑摘要 |
||
| 第3行: | 第3行: | ||
/* ============================================================ | /* ============================================================ | ||
MediaWiki:Common.css —— 神国维基全站样式 | MediaWiki:Common.css —— 神国维基全站样式 | ||
原版标签外观 + 顶部两排吸顶 | |||
============================================================ */ | ============================================================ */ | ||
/* ------------------------------------------------------------ | /* ------------------------------------------------------------ | ||
① | ① 目录(TOC):去掉默认的浮动与边框 | ||
------------------------------------------------------------ */ | ------------------------------------------------------------ */ | ||
.mw-table-of-contents-container, | .mw-table-of-contents-container, | ||
| 第55行: | 第56行: | ||
/* ------------------------------------------------------------ | /* ------------------------------------------------------------ | ||
③ | ③ 顶部两排吸顶(只定位,标签外观保持原版) | ||
------------------------------------------------------------ */ | ------------------------------------------------------------ */ | ||
| 第67行: | 第68行: | ||
padding: 5px 12px !important; | padding: 5px 12px !important; | ||
background: #ffffff; | background: #ffffff; | ||
z-index: 301; | z-index: 301; | ||
} | } | ||
/* | /* 第二排(左侧):系统消息 / 讨论 / 编辑源代码 / 历史 / 删除 / 移动 / 保护 */ | ||
#p-cactions { | #p-cactions { | ||
position: fixed !important; | position: fixed !important; | ||
| 第78行: | 第77行: | ||
left: 50% !important; | left: 50% !important; | ||
margin-left: -505px !important; | margin-left: -505px !important; | ||
padding: | padding: 3px 8px !important; | ||
background: #ffffff; | background: #ffffff; | ||
z-index: 300; | z-index: 300; | ||
} | } | ||
| 第91行: | 第88行: | ||
/* ------------------------------------------------------------ | /* ------------------------------------------------------------ | ||
④ | ④ 窄屏(小于 900px)放开固定 | ||
------------------------------------------------------------ */ | ------------------------------------------------------------ */ | ||
@media screen and (max-width: 900px) { | @media screen and (max-width: 900px) { | ||
| 第142行: | 第95行: | ||
position: static !important; | position: static !important; | ||
margin-left: 0 !important; | margin-left: 0 !important; | ||
} | } | ||
2026年10月11日 (日) 13:31的版本
/* 这里放置的CSS将应用于所有皮肤 */
/* ============================================================
MediaWiki:Common.css —— 神国维基全站样式
原版标签外观 + 顶部两排吸顶
============================================================ */
/* ------------------------------------------------------------
① 目录(TOC):去掉默认的浮动与边框
------------------------------------------------------------ */
.mw-table-of-contents-container,
.mw-table-of-contents,
#toc,
.toc {
float: none;
width: auto;
max-width: none;
margin: 0;
padding: 0;
border: none;
background: none;
font-size: 1em;
}
#p-toc .pBody {
max-height: 70vh;
overflow-y: auto;
font-size: 0.9em;
line-height: 1.6;
}
#p-toc ul {
margin: 0;
padding-left: 1.6em;
}
#p-toc .toctitle,
#p-toc .mw-table-of-contents__heading,
#p-toc .mw-table-of-contents-header {
display: none;
}
/* ------------------------------------------------------------
② 左侧导航栏:随屏幕滚动固定
------------------------------------------------------------ */
#column-one,
.mw-portlet,
.vector-menu-portal,
.sidebar-inner {
position: -webkit-sticky;
position: sticky;
top: 0;
max-height: 100vh;
overflow-y: auto;
}
/* ------------------------------------------------------------
③ 顶部两排吸顶(只定位,标签外观保持原版)
------------------------------------------------------------ */
/* 第一排(右上角):七叶 / 讨论 / 参数设置 / 监视列表 / 贡献 / 退出 */
#p-personal {
position: fixed !important;
top: 0 !important;
right: 12px !important;
left: auto !important;
margin: 0 !important;
padding: 5px 12px !important;
background: #ffffff;
z-index: 301;
}
/* 第二排(左侧):系统消息 / 讨论 / 编辑源代码 / 历史 / 删除 / 移动 / 保护 */
#p-cactions {
position: fixed !important;
top: 34px !important;
left: 50% !important;
margin-left: -505px !important;
padding: 3px 8px !important;
background: #ffffff;
z-index: 300;
}
/* 正文往下让出顶部两排的高度 */
#content {
padding-top: 80px;
}
/* ------------------------------------------------------------
④ 窄屏(小于 900px)放开固定
------------------------------------------------------------ */
@media screen and (max-width: 900px) {
#p-personal,
#p-cactions {
position: static !important;
margin-left: 0 !important;
}
#content {
padding-top: 0;
}
}