MediaWiki:Common.css
跳转到导航
跳转到搜索
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
/* ====================================================
MediaWiki 硬朗工业风美化样式
主色: #0a1518 (深空), #01faec (霓虹青), #3d839b (钢蓝), #488ab1 (亮蓝), #ffffff (纯白)
圆角: 小半径 (4px) 营造利落、硬朗的视觉风格
适用: MediaWiki 所有现代皮肤 (Vector, Monobook 等)
存放: MediaWiki:Common.css 或皮肤自定义CSS
==================================================== */
/* ---------- 全局基础 ---------- */
body {
background-color: #0a1518;
font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
color: #e8edf0;
}
/* 内容区 - 深色底衬 + 硬朗边框 */
.mw-body {
background-color: #ffffff;
color: #0a1518;
border-radius: 4px;
border-left: 4px solid #01faec;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
padding: 1.5em 2em;
margin-top: 0.5em;
transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.mw-body:hover {
box-shadow: 0 6px 20px rgba(1, 250, 236, 0.08);
border-left-color: #3d839b;
}
/* 标题 - 棱角分明 */
.mw-body h1,
.mw-body h2 {
border-bottom: 3px solid #0a1518;
padding-bottom: 0.3em;
font-weight: 600;
letter-spacing: 0.5px;
}
.mw-body h1 {
font-size: 2em;
color: #0a1518;
}
.mw-body h2 {
font-size: 1.6em;
color: #0a1518;
}
.mw-body h3,
.mw-body h4 {
color: #0a1518;
}
/* ---------- 链接 - 冷色调 + 硬边悬停 ---------- */
a {
color: #3d839b;
text-decoration: none;
transition: color 0.15s ease, background-color 0.15s ease, padding 0.1s ease;
border-bottom: 2px solid transparent;
font-weight: 500;
}
a:hover {
color: #01faec;
background-color: rgba(1, 250, 236, 0.06);
border-bottom-color: #01faec;
padding-bottom: 1px;
}
/* 外部链接 */
.mw-body a.external {
background-image: none;
padding-right: 0;
}
/* ---------- 导航栏 (Vector) ---------- */
#mw-head {
background: #0a1518;
border-radius: 0 0 4px 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
border-bottom: 2px solid #01faec;
}
/* 导航标签 - 硬朗风格 */
.vector-menu-tabs li {
background-color: transparent;
border-radius: 4px 4px 0 0;
transition: background 0.15s ease, transform 0.1s ease;
border: 1px solid transparent;
border-bottom: none;
}
.vector-menu-tabs li:hover {
background-color: rgba(1, 250, 236, 0.08);
transform: translateY(-2px);
border-color: #3d839b;
}
.vector-menu-tabs li a {
color: #e8edf0;
font-weight: 500;
border-bottom: none;
}
.vector-menu-tabs li a:hover {
border-bottom: none;
color: #01faec;
}
/* ---------- 按钮 - 工业感 ---------- */
.mw-ui-button {
background-color: #0a1518;
border: 1px solid #3d839b;
border-radius: 4px;
padding: 0.4em 1.2em;
font-weight: 500;
color: #e8edf0;
transition: all 0.15s ease;
box-shadow: none;
}
.mw-ui-button:hover {
background-color: #1a2a30;
border-color: #01faec;
color: #01faec;
box-shadow: 0 0 12px rgba(1, 250, 236, 0.15);
transform: scale(1.01);
}
/* 主要按钮 (保存) */
.mw-ui-button.mw-ui-primary {
background-color: #3d839b;
border-color: #488ab1;
color: #ffffff;
}
.mw-ui-button.mw-ui-primary:hover {
background-color: #488ab1;
border-color: #01faec;
box-shadow: 0 0 20px rgba(1, 250, 236, 0.2);
transform: scale(1.02);
color: #ffffff;
}
/* ---------- 表格 - 冷峻线条 ---------- */
.wikitable {
background-color: #ffffff;
border: 1px solid #0a1518;
border-radius: 4px;
overflow: hidden;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.wikitable th {
background-color: #0a1518;
color: #01faec;
font-weight: 600;
padding: 0.6em 1em;
border-bottom: 2px solid #3d839b;
}
.wikitable td {
padding: 0.5em 1em;
border-bottom: 1px solid #d0d7dd;
color: #0a1518;
}
.wikitable tr {
transition: background 0.12s ease;
}
.wikitable tr:hover {
background-color: rgba(1, 250, 236, 0.08);
}
.wikitable tr:hover td {
color: #0a1518;
}
/* ---------- 消息框 ---------- */
.mw-message-box {
border-radius: 4px;
border-left: 6px solid #3d839b;
background-color: #f5f8fa;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
transition: box-shadow 0.2s ease, border-color 0.2s ease;
padding: 0.8em 1.5em;
color: #0a1518;
}
.mw-message-box:hover {
box-shadow: 0 4px 14px rgba(1, 250, 236, 0.1);
border-left-color: #01faec;
}
/* ---------- 目录 (TOC) ---------- */
.toc {
background-color: #f5f8fa;
border: 1px solid #0a1518;
border-radius: 4px;
padding: 0.8em 1.2em;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.toc:hover {
box-shadow: 0 4px 16px rgba(1, 250, 236, 0.08);
border-color: #3d839b;
}
.toc ul li {
padding: 0.2em 0;
transition: padding-left 0.12s ease;
}
.toc ul li a {
border-bottom: none;
color: #0a1518;
font-weight: 400;
}
.toc ul li:hover {
padding-left: 6px;
}
.toc ul li a:hover {
color: #0a1518;
background-color: rgba(1, 250, 236, 0.06);
border-bottom: 2px solid #01faec;
}
/* ---------- 侧边栏 ---------- */
.vector-menu .vector-menu-content ul li {
border-radius: 4px;
transition: background 0.12s ease, padding-left 0.12s ease;
padding: 0.1em 0;
}
.vector-menu .vector-menu-content ul li:hover {
background: rgba(1, 250, 236, 0.06);
padding-left: 6px;
border-left: 2px solid #01faec;
}
.vector-menu .vector-menu-content ul li a {
border-bottom: none;
color: #e8edf0;
}
.vector-menu .vector-menu-content ul li a:hover {
color: #01faec;
border-bottom: none;
}
/* ---------- 编辑框 ---------- */
.mw-editform textarea {
border-radius: 4px;
border: 1px solid #0a1518;
padding: 0.8em;
font-family: 'JetBrains Mono', 'Fira Code', monospace;
font-size: 0.95em;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
background-color: #fafcfe;
color: #0a1518;
}
.mw-editform textarea:hover {
border-color: #3d839b;
box-shadow: inset 0 0 0 1px rgba(1, 250, 236, 0.2);
}
.mw-editform textarea:focus {
border-color: #01faec;
box-shadow: 0 0 0 3px rgba(1, 250, 236, 0.15), inset 0 0 0 1px #0a1518;
outline: none;
}
/* ---------- 缩略图 ---------- */
.thumbinner {
background-color: #ffffff;
border: 1px solid #0a1518;
border-radius: 4px;
padding: 6px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.thumbinner:hover {
box-shadow: 0 6px 20px rgba(1, 250, 236, 0.06);
border-color: #3d839b;
}
.thumbinner .thumbcaption {
font-size: 0.9em;
color: #0a1518;
padding: 0.4em 0.2em 0.1em;
}
/* ---------- 搜索框 ---------- */
#p-search input[type="search"] {
border-radius: 4px;
border: 1px solid #3d839b;
padding: 0.4em 1em 0.4em 2.2em;
background-color: #0a1518;
color: #e8edf0;
transition: all 0.2s ease;
width: 180px;
font-size: 0.95em;
}
#p-search input[type="search"]::placeholder {
color: #6a7f8a;
}
#p-search input[type="search"]:hover {
border-color: #01faec;
background-color: #122024;
box-shadow: 0 0 12px rgba(1, 250, 236, 0.06);
width: 200px;
}
#p-search input[type="search"]:focus {
border-color: #01faec;
box-shadow: 0 0 0 3px rgba(1, 250, 236, 0.12);
width: 220px;
outline: none;
background-color: #0a1518;
color: #ffffff;
}
/* ---------- 页脚 ---------- */
#footer {
background: #0a1518;
border-radius: 4px 4px 0 0;
padding: 1.2em 1.5em;
margin-top: 2em;
color: #8a9ba6;
border-top: 2px solid #01faec;
}
#footer a {
color: #3d839b;
border-bottom: none;
}
#footer a:hover {
color: #01faec;
background-color: transparent;
border-bottom: none;
}
/* ---------- 杂项 ---------- */
.mw-indicators {
opacity: 0.7;
transition: opacity 0.15s ease;
}
.mw-indicators:hover {
opacity: 1;
}
.mw-summary {
border-radius: 4px;
border: 1px solid #0a1518;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
background-color: #fafcfe;
color: #0a1518;
}
.mw-summary:hover {
border-color: #3d839b;
box-shadow: inset 0 0 0 1px rgba(1, 250, 236, 0.15);
}
/* 差异对比 */
td.diff-context,
td.diff-deletedline,
td.diff-addedline {
border-radius: 4px;
transition: background 0.12s ease;
}
td.diff-context:hover,
td.diff-deletedline:hover,
td.diff-addedline:hover {
background: rgba(1, 250, 236, 0.06);
}
/* 特别: 霓虹青点缀块 */
.mw-body .mw-parser-output .highlight-box {
border-left: 6px solid #01faec;
background: #f5f8fa;
padding: 0.8em 1.2em;
border-radius: 4px;
transition: box-shadow 0.2s ease;
}
.mw-body .mw-parser-output .highlight-box:hover {
box-shadow: 0 0 20px rgba(1, 250, 236, 0.08);
}
/* ====================================================
风格: 硬朗、冷峻、工业感
主色: 深空 #0a1518 | 霓虹青 #01faec | 钢蓝 #3d839b
==================================================== */