“MediaWiki:Common.css”的版本间差异
跳到导航
跳到搜索
标签:已被回退 |
标签:手工回退 |
||
| 第4行: | 第4行: | ||
display: none; | display: none; | ||
} | } | ||
/* ====== | /* ====== 右侧悬浮目录(排除首页) ====== */ | ||
/* | /* 只在非首页页面显示悬浮目录 */ | ||
body:not(.page-Main_Page) #toc { | body:not(.page-Main_Page) #toc { | ||
position: fixed !important; | position: fixed !important; | ||
| 第15行: | 第15行: | ||
overflow-y: auto !important; | overflow-y: auto !important; | ||
background: #ffffff !important; | background: #ffffff !important; | ||
border: | border: 1px solid #a2a9b1 !important; | ||
border-radius: 6px !important; | border-radius: 6px !important; | ||
padding: 15px !important; | padding: 15px !important; | ||
| 第29行: | 第29行: | ||
} | } | ||
/* | /* 非首页的内容区域向右偏移,避免与悬浮目录重叠 */ | ||
body:not(.page-Main_Page) .mw-body-content { | body:not(.page-Main_Page) .mw-body-content { | ||
margin-right: 320px !important; | margin-right: 320px !important; | ||
transition: margin-right 0.3s ease !important; | |||
} | } | ||
/* | /* 移动端响应式:小屏幕不悬浮 */ | ||
@media (max-width: 1200px) { | @media (max-width: 1200px) { | ||
body:not(.page-Main_Page) #toc { | body:not(.page-Main_Page) #toc { | ||
2025年9月30日 (二) 17:48的版本
/* 这里放置的CSS将应用于所有皮肤 */
/* 隐藏首页侧边栏的搜索框 */
.page-Main_Page #p-search {
display: none;
}
/* ====== 右侧悬浮目录(排除首页) ====== */
/* 只在非首页页面显示悬浮目录 */
body:not(.page-Main_Page) #toc {
position: fixed !important;
top: 120px !important;
right: 20px !important;
width: 280px !important;
max-height: 70vh !important;
overflow-y: auto !important;
background: #ffffff !important;
border: 1px solid #a2a9b1 !important;
border-radius: 6px !important;
padding: 15px !important;
box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
z-index: 999 !important;
font-size: 0.9em !important;
line-height: 1.4 !important;
}
/* 首页隐藏目录 */
.page-Main_Page #toc {
display: none !important;
}
/* 非首页的内容区域向右偏移,避免与悬浮目录重叠 */
body:not(.page-Main_Page) .mw-body-content {
margin-right: 320px !important;
transition: margin-right 0.3s ease !important;
}
/* 移动端响应式:小屏幕不悬浮 */
@media (max-width: 1200px) {
body:not(.page-Main_Page) #toc {
position: static !important;
width: auto !important;
max-height: none !important;
margin: 1em 0 !important;
}
body:not(.page-Main_Page) .mw-body-content {
margin-right: 0 !important;
}
}