MediaWiki:Common.css
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* === 首页专用样式:将顶部导航栏移到底部 === */
/* 1. 把顶部区域移到底部 */
body.page-Main_Page #mw-head-base,
body.page-Main_Page #mw-head,
body.page-Main_Page #p-personal,
body.page-Main_Page #mw-panel {
position: fixed !important;
top: auto !important;
bottom: 0 !important;
width: 100%;
z-index: 999;
background-color: #f8f9fa;
padding: 10px 20px;
box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
display: flex !important;
justify-content: space-between;
align-items: center;
}
/* 2. 避免内容被导航遮住 */
body.page-Main_Page #content {
margin-bottom: 140px !important;
}
/* 3. 隐藏首页的大标题(Main Page) */
body.page-Main_Page .firstHeading {
display: none !important;
}
/* 4. 隐藏 logo 旁边的 wiki 名字 */
body.page-Main_Page .mw-logo-wordmark {
display: none !important;
}
/* 5. 可选:测试首页是否成功加载了 CSS */
body.page-Main_Page {
background-color: #fffff5 !important; /* 淡米色背景,测试用 */
}