MediaWiki:Common.css
MediaWiki界面页面
更多操作
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* ============================================
江中缘 Wiki — MediaWiki:Common.css
使用方法:复制全部内容到
https://wiki.mcjzy.net/wiki/MediaWiki:Common.css?action=edit
============================================ */
/* ===== 全局背景与字体(用户原有) ===== */
body {
color: #1a1a1a;
background: url("/images/1/18/%E4%B8%BB%E9%A1%B5%E8%83%8C%E6%99%AF1980.png") no-repeat fixed center center / cover;
}
/* ===== 内容区遮罩(用户原有 + 扩展覆盖范围) ===== */
#mw-page-base {
background: rgba(255, 255, 255, 0.88) !important;
}
/* 扩展:正文区和侧边栏也加上遮罩,确保文字在背景图上可读 */
.mw-body,
.mw-body-content,
#mw-panel {
background: rgba(255, 255, 255, 0.88) !important;
}
/* 正文段落 — 增加行高 */
.mw-body-content p {
line-height: 1.85 !important;
}
/* ===== 标题层级优化(新增) ===== */
/* H2 二级标题(== 标题 ==) */
h2 {
color: #0a5258 !important;
font-weight: 800 !important;
font-size: 1.65em !important;
border-bottom: none !important;
padding-bottom: 6px !important;
/* 浅色阴影在背景图暗部穿透时保证可读 */
text-shadow: 0 1px 2px rgba(255, 255, 255, 0.7) !important;
}
/* H2 装饰线 — 海洋三色渐变 */
h2::after {
content: '';
display: block;
width: 100%;
height: 3px;
margin-top: 10px;
border-radius: 2px;
background: linear-gradient(90deg, #0a8b94, #1a7a4c, #b8860b);
}
/* H3 三级标题(=== 标题 ===) */
h3 {
color: #1a5a3a !important;
font-weight: 700 !important;
text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6) !important;
}
/* H4 四级标题 */
h4 {
color: #0a6a78 !important;
font-weight: 700 !important;
}
/* ===== 链接颜色(新增) ===== */
.mw-body-content a:link {
color: #0a7a8a !important;
}
.mw-body-content a:visited {
color: #0a6a78 !important;
}
.mw-body-content a:hover {
color: #b8860b !important;
text-decoration: underline !important;
}
/* ===== TOC 目录美化(新增) ===== */
.toc {
background: #f5fafc !important;
border: 1px solid #d0e8ec !important;
border-radius: 10px !important;
padding: 14px 18px !important;
}
.toc h2 {
color: #0a5258 !important;
font-weight: 700 !important;
}
.toclevel-1 > .toclink::before {
content: '▸ ';
color: #0a8b94;
}
/* ===== 用户原有 CSS 类(保留不动) ===== */
/* 关于江中缘 - 特色卡片 */
.feature-card {
padding: 18px 14px;
border-radius: 12px;
text-align: center;
font-weight: bold;
border-bottom: 3px solid;
}
.feature-card-blue {
background: #e3f2fd;
color: #0d47a1;
border-bottom-color: #1976d2;
}
.feature-card-green {
background: #e8f5e9;
color: #1b5e20;
border-bottom-color: #388e3c;
}
.feature-card-orange {
background: #fff3e0;
color: #e65100;
border-bottom-color: #f57c00;
}
.feature-card-red {
background: #fce4ec;
color: #c62828;
border-bottom-color: #c62828;
}
/* 热门页面卡片 */
.hot-card {
padding: 14px 16px;
border-radius: 8px;
font-weight: 600;
text-align: center;
border-bottom: 3px solid;
}
.hot-card-green {
background: #e8f5e9;
color: #1b5e20;
border-bottom-color: #388e3c;
}
.hot-card-red {
background: #fce4ec;
color: #b71c1c;
border-bottom-color: #c62828;
}
.hot-card-cyan {
background: #e0f7fa;
color: #006064;
border-bottom-color: #00bcd4;
}
.hot-card-orange {
background: #fff3e0;
color: #bf360c;
border-bottom-color: #f57c00;
}
/* Wiki 统计 */
.stat-card {
padding: 20px 16px;
border-radius: 12px;
text-align: center;
font-weight: 700;
border-bottom: 3px solid;
}
.stat-card-blue {
background: #e3f2fd;
color: #0d47a1;
border-bottom-color: #1976d2;
}
.stat-card-green {
background: #e8f5e9;
color: #1b5e20;
border-bottom-color: #388e3c;
}
/* 分隔线 */
.divider {
border: 0;
border-bottom: 3px solid;
margin: 20px 0;
}
/* ===== 页脚(新增) ===== */
#footer {
color: #6a7a8a !important;
}
/* ===== 移动端适配(新增) ===== */
@media (max-width: 560px) {
h2 {
font-size: 1.35em !important;
}
h2::after {
height: 2px;
margin-top: 6px;
}
}