MediaWiki:Common.css: Difference between revisions
No edit summary |
No edit summary |
||
Line 36: | Line 36: | ||
body:not(.loggedin) #ca-unwatch, | body:not(.loggedin) #ca-unwatch, | ||
body:not(.loggedin) .vector-page-toolbar { | body:not(.loggedin) .vector-page-toolbar { | ||
display: none !important; | |||
} | |||
/* 首页专用:将顶部栏整体移到底部 */ | |||
body.page-Main_Page #mw-head, | |||
body.page-Main_Page #p-personal, | |||
body.page-Main_Page #mw-navigation, | |||
body.page-Main_Page #mw-panel { | |||
position: fixed !important; | |||
bottom: 0 !important; | |||
top: auto !important; | |||
width: 100%; | |||
z-index: 999; | |||
background-color: #f8f9fa; | |||
padding: 10px 20px; | |||
display: flex !important; | |||
justify-content: center; | |||
align-items: center; | |||
gap: 30px; | |||
border-top: 1px solid #ddd; | |||
} | |||
/* 隐藏顶部标题间距 */ | |||
body.page-Main_Page { | |||
padding-top: 0 !important; | |||
margin-top: 0 !important; | |||
} | |||
/* 首页 logo 居中 */ | |||
body.page-Main_Page .mw-wiki-logo { | |||
background-size: contain !important; | |||
width: 80px !important; | |||
height: 80px !important; | |||
background-repeat: no-repeat !important; | |||
background-position: center center !important; | |||
order: -1; | |||
} | |||
/* 隐藏 logo 旁边的 wiki 文字 */ | |||
body.page-Main_Page .mw-logo-wordmark { | |||
display: none !important; | display: none !important; | ||
} | } |
Revision as of 08:25, 11 April 2025
.catlinks { display: none; } .firstHeading { display: none; } /* 可选:如果你也想隐藏“Main Page | Discussion”标签页按钮 */ #contentSub, #ca-nstab-main, #ca-talk, #content-actions { display: none !important; } /* 隐藏 logo 旁边的 wiki 文字名称 */ #p-personal h1, #mw-head-base h1, #p-logo-text, .mw-logo-wordmark { display: none !important; } #p-tb, .vector-menu-portal, .mw-portlet-toolbox { display: none !important; } /* 隐藏页面右上角的 Read / Edit / View history / Watch 等按钮 */ .vector-menu-tabs, #ca-view, #ca-edit, #ca-history, #ca-watch, #ca-unwatch, .vector-page-toolbar { display: none !important; } /* 仅隐藏“未登录用户”的顶部功能按钮,如 Edit / View history */ body:not(.loggedin) .vector-menu-tabs, body:not(.loggedin) #ca-view, body:not(.loggedin) #ca-edit, body:not(.loggedin) #ca-history, body:not(.loggedin) #ca-watch, body:not(.loggedin) #ca-unwatch, body:not(.loggedin) .vector-page-toolbar { display: none !important; } /* 首页专用:将顶部栏整体移到底部 */ body.page-Main_Page #mw-head, body.page-Main_Page #p-personal, body.page-Main_Page #mw-navigation, body.page-Main_Page #mw-panel { position: fixed !important; bottom: 0 !important; top: auto !important; width: 100%; z-index: 999; background-color: #f8f9fa; padding: 10px 20px; display: flex !important; justify-content: center; align-items: center; gap: 30px; border-top: 1px solid #ddd; } /* 隐藏顶部标题间距 */ body.page-Main_Page { padding-top: 0 !important; margin-top: 0 !important; } /* 首页 logo 居中 */ body.page-Main_Page .mw-wiki-logo { background-size: contain !important; width: 80px !important; height: 80px !important; background-repeat: no-repeat !important; background-position: center center !important; order: -1; } /* 隐藏 logo 旁边的 wiki 文字 */ body.page-Main_Page .mw-logo-wordmark { display: none !important; }