MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第65行: | 第65行: | ||
用于切换“立绘/重创/心智升级” | 用于切换“立绘/重创/心智升级” | ||
========================================================================== */ | ========================================================================== */ | ||
.tab . | [cite_start]/* 1. 基础容器布局 [cite: 25-26] */ | ||
.Tabs, .tab { | |||
margin: 1em 0; | |||
clear: both; | |||
max-width: 100%; | |||
} | |||
[cite_start]/* 2. 标签栏:使用 Flex 布局并允许换行 [cite: 2, 22-24] */ | |||
.tab .TabLabel, .Tabs .TabLabel { | |||
display: flex; | |||
flex-wrap: wrap; | |||
position: relative; | |||
z-index: 2; | |||
-webkit-user-select: none; | |||
user-select: none; | |||
} | |||
[cite_start]/* 3. 标签文本:仅定义间距、边框宽度和光标样式 [cite: 2, 27] */ | |||
.tab .TabLabelText, .Tabs .TabLabel .TabLabelText { | |||
padding: 7px 15px; | |||
cursor: pointer; | cursor: pointer; | ||
border: 1px solid | flex: none; | ||
margin-right: | border: 1px solid transparent; /* 预留边框位置,颜色由模板决定 */ | ||
border-bottom: none; | |||
margin-right: 2px; | |||
transition: opacity 0.2s; | |||
} | } | ||
.tab .TabLabelText.selected { | |||
[cite_start]/* 4. 选中状态:仅处理布局微调,不设背景色 [cite: 3, 5-6, 14] */ | |||
.tab .TabLabelText.selected, .Tabs .TabLabel .TabLabelText.selected { | |||
font-weight: bold; | font-weight: bold; | ||
border- | border: 1px solid #aaa; /* 仅给个基础边框线 */ | ||
border-bottom: 2px solid #ffffff !important; /* 关键:强制遮挡底线 */ | |||
margin-bottom: -2px; | |||
z-index: 3; | |||
} | } | ||
.tab .TabContent { | |||
[cite_start]/* 5. 内容区域:仅定义边距和边框 [cite: 28] */ | |||
.tab .TabContent, .Tabs .TabContent { | |||
padding: 15px; | padding: 15px; | ||
position: relative; | |||
z-index: 1; | |||
border: 1px solid #aaa; | border: 1px solid #aaa; | ||
margin-top: -1px; | margin-top: -1px; /* 与标签栏紧贴 */ | ||
} | |||
[cite_start]/* 6. 核心显隐逻辑:这是 JS 切换生效的前提 [cite: 4] */ | |||
.tab .TabContentText, .Tabs .TabContent .TabContentText { | |||
display: none; | |||
} | |||
.tab .TabContentText.selected, .Tabs .TabContent .TabContentText.selected { | |||
display: block; | |||
} | |||
[cite_start]/* 7. 响应式图片处理 [cite: 92-93] */ | |||
.TabContentText img { | |||
max-width: 100% !important; | |||
height: auto !important; | |||
} | } | ||
/* ========================================================================== | /* ========================================================================== | ||
2026年1月23日 (五) 16:26的版本
/* ==================================================
OGAS 协议架构 - 智能隐身模式 (修正版)
================================================== */
/* 1. 【核心】隐藏针对路人的“入口”
解释:#pt-login 是登录连接,#pt-createaccount 是注册。
只要隐藏这两个,路人就找不到门了。
注意:千万不要在这里隐藏 #pt-logout 或 #pt-preferences!
*/
#pt-login, #pt-createaccount {
display: none !important;
}
/* 2. 隐藏普通用户不需要关心的“页面工具”
解释:隐藏历史记录、查看源码、讨论页等
*/
#ca-viewsource, #ca-history, #ca-talk {
display: none !important;
}
/* 3. 隐藏侧边栏的杂项 */
#t-permalink, #t-info, #t-specialpages, #t-print, #n-help {
display: none !important;
}
/* 4. 隐藏底部版权图标 (为了更像独立网站) */
#footer-poweredbyico {
display: none !important;
}
/* 【逻辑说明】
你不需要写“登录后显示 xxx”。
因为当你登录成功后,MediaWiki 会自动生成 #pt-logout (退出)、
#pt-userpage (用户页)、#pt-preferences (设置)。
因为上面的第1条代码里没有隐藏这些 ID,
所以一旦你登录,它们自然会显示出来给指挥官你看!
*/
/* 一点样式代码测试 */
/* ==========================================================================
1. 萌百特色:黑幕 (Heimu)
用法:<span class="heimu">这里是剧透内容</span>
========================================================================== */
.heimu, .heimu rt {
background-color: #252525;
transition: color 0.13s linear;
color: #252525; /* 初始颜色与背景一致 */
text-shadow: none;
}
.heimu a, a .heimu, .new .heimu {
transition: color 0.13s linear;
color: #252525;
}
/* 鼠标悬停显示 */
span.heimu:hover, span.heimu:active { color: #ffffff !important; }
span.heimu:hover a, a:hover span.heimu { color: #add8e6 !important; }
span.heimu:hover a:visited { color: #c5cae9 !important; }
/* ==========================================================================
2. 选项卡组件 (Tabs)
用于切换“立绘/重创/心智升级”
========================================================================== */
[cite_start]/* 1. 基础容器布局 [cite: 25-26] */
.Tabs, .tab {
margin: 1em 0;
clear: both;
max-width: 100%;
}
[cite_start]/* 2. 标签栏:使用 Flex 布局并允许换行 [cite: 2, 22-24] */
.tab .TabLabel, .Tabs .TabLabel {
display: flex;
flex-wrap: wrap;
position: relative;
z-index: 2;
-webkit-user-select: none;
user-select: none;
}
[cite_start]/* 3. 标签文本:仅定义间距、边框宽度和光标样式 [cite: 2, 27] */
.tab .TabLabelText, .Tabs .TabLabel .TabLabelText {
padding: 7px 15px;
cursor: pointer;
flex: none;
border: 1px solid transparent; /* 预留边框位置,颜色由模板决定 */
border-bottom: none;
margin-right: 2px;
transition: opacity 0.2s;
}
[cite_start]/* 4. 选中状态:仅处理布局微调,不设背景色 [cite: 3, 5-6, 14] */
.tab .TabLabelText.selected, .Tabs .TabLabel .TabLabelText.selected {
font-weight: bold;
border: 1px solid #aaa; /* 仅给个基础边框线 */
border-bottom: 2px solid #ffffff !important; /* 关键:强制遮挡底线 */
margin-bottom: -2px;
z-index: 3;
}
[cite_start]/* 5. 内容区域:仅定义边距和边框 [cite: 28] */
.tab .TabContent, .Tabs .TabContent {
padding: 15px;
position: relative;
z-index: 1;
border: 1px solid #aaa;
margin-top: -1px; /* 与标签栏紧贴 */
}
[cite_start]/* 6. 核心显隐逻辑:这是 JS 切换生效的前提 [cite: 4] */
.tab .TabContentText, .Tabs .TabContent .TabContentText {
display: none;
}
.tab .TabContentText.selected, .Tabs .TabContent .TabContentText.selected {
display: block;
}
[cite_start]/* 7. 响应式图片处理 [cite: 92-93] */
.TabContentText img {
max-width: 100% !important;
height: auto !important;
}
/* ==========================================================================
2. 导航箱 (Navbox) - 仅保留布局,颜色交给模板
========================================================================== */
table.navbox {
border: 1px solid #aaa;
width: 100%;
margin: auto;
clear: both;
font-size: 88%;
text-align: center;
border-collapse: collapse;
}
/* 移除原本固定的 background 设置,允许模板参数生效 */
.navbox-title,
table.navbox th {
padding-left: 1em; /* [cite: 82] */
padding-right: 1em; /* [cite: 82] */
text-align: center; /* [cite: 82] */
}
.navbox-group {
font-weight: bold; /* [cite: 82] */
white-space: nowrap; /* [cite: 82] */
padding: 0 10px;
}
.navbox-list {
border-color: #fdfdfd; /* [cite: 83] */
}
/* ==========================================================================
4. 侧边信息栏 (InfoBox)
角色属性、数值面板基础
========================================================================== */
.infotemplatebox {
float: right;
width: 280px;
font-size: 90%;
margin: 0 0 1em 1em;
background: #f9f9f9;
border: 1px solid #999;
border-collapse: collapse;
clear: right;
}
.infoBoxTitle {
background: #deede0;
color: #228b22;
text-align: center;
font-weight: bold;
padding: 5px;
}
/* ==========================================================================
5. 通用修正
防止图片溢出、强制换行等运维小优化
========================================================================== */
pre {
white-space: pre-wrap;
overflow-wrap: break-word;
}
.wikitable {
max-width: 100%;
margin: 1em 0;
}