MediaWiki:Common.css:修订间差异
外观
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/**************************************************** | /**************************************************** | ||
* ✅ | * ✅ 修复首页顶部灰色大框 / padding 异常 | ||
* ✅ 适用于 Vector-2022 | |||
****************************************************/ | ****************************************************/ | ||
/* | /* ✅(最关键)阻止首页第一段被误解析成 <pre> 并生成灰框 */ | ||
body.page-Main_Page pre, | |||
body.page-Main_Page pre.mw-code { | |||
background: transparent !important; | |||
padding: 0 !important; | |||
margin: 0 !important; | |||
border: none !important; | |||
box-shadow: none !important; | |||
white-space: normal !important; | |||
overflow-x: visible !important; | |||
} | |||
/* ✅ 禁止 Vector-2022 为首页自动加的外层 padding 框 */ | |||
body.page-Main_Page .vector-feature-main, | body.page-Main_Page .vector-feature-main, | ||
body.page-Main_Page .vector-feature-body, | body.page-Main_Page .vector-feature-body, | ||
body.page-Main_Page .vector-main-container, | body.page-Main_Page .vector-main-container, | ||
body.page-Main_Page .vector-content-container, | |||
body.page-Main_Page .vector-sticky-header-container, | |||
body.page-Main_Page .vector-page-toolbar, | |||
body.page-Main_Page .vector-feature-container, | |||
body.page-Main_Page .vector-body, | |||
body.page-Main_Page #content, | body.page-Main_Page #content, | ||
body.page-Main_Page .mw-body, | body.page-Main_Page .mw-body, | ||
| 第12行: | 第30行: | ||
padding: 0 !important; | padding: 0 !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
background: | background: #ffffff !important; /* 纯白,不要灰色 */ | ||
border: none !important; | border: none !important; | ||
box-shadow: none !important; | box-shadow: none !important; | ||
} | } | ||
/* | /* ✅ 单独修掉最外层页面容器(会导致你看到大圆角灰框的罪魁祸首) */ | ||
body.page-Main_Page .vector-page-container { | body.page-Main_Page .vector-page-container { | ||
padding: 0 !important; | padding: 0 !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
background: | background: #ffffff !important; | ||
border: none !important; | border: none !important; | ||
box-shadow: none !important; | |||
} | |||
/* ✅ 让首页布局真正紧贴顶部 */ | |||
body.page-Main_Page .mw-parser-output { | |||
margin-top: 0 !important; | |||
padding-top: 0 !important; | |||
} | } | ||
2025年11月7日 (五) 16:18的版本
/****************************************************
* ✅ 修复首页顶部灰色大框 / padding 异常
* ✅ 适用于 Vector-2022
****************************************************/
/* ✅(最关键)阻止首页第一段被误解析成 <pre> 并生成灰框 */
body.page-Main_Page pre,
body.page-Main_Page pre.mw-code {
background: transparent !important;
padding: 0 !important;
margin: 0 !important;
border: none !important;
box-shadow: none !important;
white-space: normal !important;
overflow-x: visible !important;
}
/* ✅ 禁止 Vector-2022 为首页自动加的外层 padding 框 */
body.page-Main_Page .vector-feature-main,
body.page-Main_Page .vector-feature-body,
body.page-Main_Page .vector-main-container,
body.page-Main_Page .vector-content-container,
body.page-Main_Page .vector-sticky-header-container,
body.page-Main_Page .vector-page-toolbar,
body.page-Main_Page .vector-feature-container,
body.page-Main_Page .vector-body,
body.page-Main_Page #content,
body.page-Main_Page .mw-body,
body.page-Main_Page .mw-body-content {
padding: 0 !important;
margin: 0 !important;
background: #ffffff !important; /* 纯白,不要灰色 */
border: none !important;
box-shadow: none !important;
}
/* ✅ 单独修掉最外层页面容器(会导致你看到大圆角灰框的罪魁祸首) */
body.page-Main_Page .vector-page-container {
padding: 0 !important;
margin: 0 !important;
background: #ffffff !important;
border: none !important;
box-shadow: none !important;
}
/* ✅ 让首页布局真正紧贴顶部 */
body.page-Main_Page .mw-parser-output {
margin-top: 0 !important;
padding-top: 0 !important;
}