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。
/* ==========================================================================
1. 系统界面清理 (隐藏不必要的工具)
========================================================================== */
#ca-viewsource, #ca-history, #ca-talk {
display: none !important;
}
pre {
white-space: pre-wrap;
overflow-wrap: break-word;
}
.wikitable {
max-width: 100%;
margin: 1em 0;
}
/* ==========================================================================
2. 交互组件 (黑幕与选项卡)
========================================================================== */
/* 黑幕:增加自适应色值与防拖选 */
.heimu, .heimu rt {
background-color: var(--color-base, #252525);
color: var(--color-base, #252525);
text-shadow: none;
transition: color 0.13s linear, background-color 0.13s linear;
user-select: none;
}
.heimu a, a .heimu, .new .heimu {
color: var(--color-base, #252525);
}
/* 悬停:背景变透明,文字恢复正常色 */
span.heimu:hover, span.heimu:active {
background-color: transparent;
color: var(--color-base--inverted, #ffffff) !important;
user-select: text;
}
span.heimu:hover a, a:hover span.heimu { color: var(--color-primary, #add8e6) !important; }
/* 选项卡 (Tabs):统一使用 Radio 方案,适配 Citizen 主色 */
.tab-container input[type="radio"] { display: none; }
.tab-labels {
display: flex;
flex-wrap: wrap;
border-bottom: 2px solid var(--border-color-base, #ddd);
margin-bottom: 10px;
gap: 5px;
}
.tab-labels label {
padding: 8px 20px;
cursor: pointer;
background: var(--color-surface-1, #f8f9fa);
border: 1px solid var(--border-color-base, #ddd);
border-bottom: none;
border-radius: 6px 6px 0 0;
transition: all 0.2s ease;
}
/* 选中状态:利用 Citizen 皮肤主色 */
#tab1:checked ~ .tab-labels label[for="tab1"],
#tab2:checked ~ .tab-labels label[for="tab2"],
#tab3:checked ~ .tab-labels label[for="tab3"] {
background: var(--color-primary, #36c);
color: #fff;
border-color: var(--color-primary, #36c);
font-weight: bold;
}
.tab-content {
display: none;
padding: 20px;
border: 1px solid var(--border-color-base, #ddd);
border-top: none;
background: var(--color-surface-0, #fff);
border-radius: 0 0 8px 8px;
min-height: 50px;
}
#tab1:checked ~ #content1,
#tab2:checked ~ #content2,
#tab3:checked ~ #content3 { display: block; }
/* ==========================================================================
3. 内容容器 (Navbox & InfoBox) - 适配暗色模式
========================================================================== */
table.navbox {
border: 1px solid var(--border-color-base, #aaa);
width: 100%;
margin: auto;
font-size: 88%;
background: var(--color-surface-1);
border-collapse: collapse;
}
.navbox-group {
font-weight: bold;
white-space: nowrap;
padding: 0 10px;
background: var(--color-surface-2);
}
.infotemplatebox {
float: right;
width: 280px;
font-size: 90%;
margin: 0 0 1em 1em;
background: var(--color-surface-1, #f9f9f9);
border: 1px solid var(--border-color-base, #999);
border-collapse: collapse;
clear: right;
}
.infoBoxTitle {
background: rgba(34, 139, 34, 0.15); /* 柔和绿色背景 */
color: var(--color-primary, #228b22);
text-align: center;
font-weight: bold;
padding: 8px;
}
/* ==========================================================================
4. 首页网格与导航系统
========================================================================== */
/* 游戏 Logo 按钮 */
.game-logo-btn {
cursor: pointer;
transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
filter: brightness(0.9);
}
.game-logo-btn:hover {
transform: scale(1.08);
filter: brightness(1.1);
}
/* 移动端适配:Logo 自动缩小 */
@media (max-width: 768px) {
.game-logo-btn img {
width: 120px !important;
height: auto !important;
}
}
/* 首页大棋盘 */
.home-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
}
.home-card {
background: var(--color-surface-1);
border: 1px solid var(--border-color-base);
border-radius: 12px;
padding: 24px;
transition: all 0.3s ease;
}
.home-card:hover {
transform: translateY(-4px);
box-shadow: var(--box-shadow-drop, 0 8px 24px rgba(0,0,0,0.15));
border-color: var(--color-primary);
}
/* 折叠内容动画 */
.home-game-fold summary {
list-style: none;
cursor: pointer;
outline: none;
}
.home-game-fold summary::-webkit-details-marker { display: none; }
.home-game-fold[open] .fold-content {
animation: slideDownFade 0.4s ease-out;
padding: 15px;
background: var(--color-surface-2);
border-radius: 10px;
}
@keyframes slideDownFade {
from { opacity: 0; transform: translateY(-15px); }
to { opacity: 1; transform: translateY(0); }
}
/* 子项目文字 */
.nav-sub-text {
margin-top: 12px;
font-weight: 600;
font-size: 14px;
color: var(--color-base);
}