打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Common.css

MediaWiki界面页面
Jzyfate留言 | 贡献2026年7月15日 (三) 11:43的版本

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
/* ===== 江中缘 Wiki 全局样式 ===== */

/* --- 基础样式 --- */
body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* --- 链接样式 --- */
a {
    color: #1976d2;
    text-decoration: none;
}

a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

/* --- 标题样式 --- */
#mw-content-wrapper h1,
#mw-content-wrapper h2,
#mw-content-wrapper h3,
#mw-content-wrapper h4 {
    color: #1a237e;
    border-bottom: 3px solid #1976d2;
    padding-bottom: 10px;
}

#mw-content-wrapper h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: #ff9800;
    margin-top: 3px;
}

#mw-content-wrapper h3 {
    border-bottom: 2px dashed #e0e0e0;
    padding-bottom: 8px;
}

/* --- 内容区域 --- */
#mw-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* --- 表格样式 --- */
.wikitable {
    border-collapse: collapse;
    width: 100%;
}

.wikitable th {
    background: linear-gradient(135deg, #1565c0, #1976d2);
    color: white;
    padding: 14px 18px;
}

.wikitable td {
    padding: 12px 18px;
    border-bottom: 1px solid #eee;
}

.wikitable tr:hover td {
    background: #f5f7fa;
}

/* --- 目录箭头样式 --- */
.toclevel-1 > .toclink::before {
    content: "▶ ";
    color: #1976d2;
}

.toclevel-2 > .toclink::before {
    content: "├─ ";
    color: #666;
}

.toclevel-3 > .toclink::before {
    content: "│  └─ ";
    color: #999;
}

/* --- 隐藏页脚 --- */
#footer { display: none; }

/* --- 深色模式 --- */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a2e;
        color: #e0e0e0;
    }

    #mw-content {
        background: #16213e;
    }

    a { color: #64b5f6; }

    #mw-content-wrapper h1,
    #mw-content-wrapper h2,
    #mw-content-wrapper h3 {
        color: #90caf9;
        border-bottom-color: #1976d2;
    }

    .toclevel-1 > .toclink::before { color: #64b5f6; }
    .toclevel-2 > .toclink::before { color: #888; }
    .toclevel-3 > .toclink::before { color: #666; }

    .wikitable td { border-bottom-color: #2a2a4a; }
    .wikitable tr:hover td { background: #1e2a4a; }
}