|
|
| 第1行: |
第1行: |
| /* ===== 迷雾ARG Wiki 主页样式优化 ===== */ | | /* 终极居中解决方案 - 使用!important强制覆盖 */ |
| | | .mw-parser-output table, |
| /* 主页所有wikitable表格居中 */
| | .mw-parser-output .wikitable { |
| .mw-parser-output > .wikitable {
| |
| margin-left: auto !important;
| |
| margin-right: auto !important;
| |
| }
| |
| | |
| /* 主页导航卡片容器居中 */
| |
| .mw-parser-output > table { | |
| margin-left: auto !important;
| |
| margin-right: auto !important;
| |
| }
| |
| | |
| /* 确保嵌套表格也居中 */
| |
| .wikitable table {
| |
| margin-left: auto !important;
| |
| margin-right: auto !important;
| |
| }
| |
| | |
| /* 导航卡片网格布局优化 */
| |
| .mw-parser-output > table[style*="border-collapse:separate"] { | |
| display: table !important;
| |
| margin: 0 auto 20px auto !important;
| |
| }
| |
| | |
| /* 快速导航区域的表格行居中 */
| |
| .mw-parser-output > table > tbody > tr {
| |
| text-align: center;
| |
| }
| |
| | |
| /* 确保表格单元格内的内容居中 */
| |
| .wikitable td[style*="text-align:center"] {
| |
| text-align: center !important;
| |
| }
| |
| | |
| /* 特色内容区域表格居中 */
| |
| .wikitable[style*="border-radius:6px"] {
| |
| margin: 0 auto !important;
| |
| }
| |
| | |
| /* 统计信息和相关链接表格居中 */
| |
| .wikitable[style*="background:#263238"],
| |
| .wikitable[style*="background:#1a237e"],
| |
| .wikitable[style*="background:#1b5e20"],
| |
| .wikitable[style*="background:#b71c1c"],
| |
| .wikitable[style*="background:#4a148c"] {
| |
| margin: 0 auto !important;
| |
| }
| |
| | |
| /* 顶部横幅和公告栏居中 */
| |
| .wikitable[style*="linear-gradient"],
| |
| .wikitable[style*="background:#2c2c1f"] { | |
| margin: 0 auto !important;
| |
| display: table !important;
| |
| }
| |
| | |
| /* 最新动态板块居中 */
| |
| .wikitable[style*="background:#1e1e1e"] {
| |
| margin: 0 auto !important;
| |
| }
| |
| | |
| /* 社区支持板块居中 */
| |
| .wikitable[style*="background:#0d47a1"] {
| |
| margin: 0 auto !important; | | margin: 0 auto !important; |
| | float: none !important; |
| | position: relative !important; |
| } | | } |
|
| |
|
| /* 修复表格宽度100%时的居中问题 */ | | /* 清除可能影响居中的浮动 */ |
| table[style*="width:100%"].wikitable {
| | .mw-parser-output::after { |
| max-width: 100%;
| | content: ""; |
| margin-left: auto !important;
| | display: table; |
| margin-right: auto !important;
| | clear: both; |
| }
| |
| | |
| /* 响应式优化 - 移动端 */
| |
| @media screen and (max-width: 768px) {
| |
| .mw-parser-output > table {
| |
| margin: 0 auto !important;
| |
| width: 95% !important;
| |
| }
| |
|
| |
| .wikitable { | |
| margin: 0 auto 15px auto !important;
| |
| } | |
| }
| |
| | |
| /* 确保页面内容容器居中 */
| |
| .mw-parser-output {
| |
| margin: 0 auto;
| |
| }
| |
| | |
| /* 表格内嵌套表格的对齐 */
| |
| .wikitable .wikitable {
| |
| margin: 0 auto !important; | |
| } | | } |
/* 终极居中解决方案 - 使用!important强制覆盖 */
.mw-parser-output table,
.mw-parser-output .wikitable {
margin: 0 auto !important;
float: none !important;
position: relative !important;
}
/* 清除可能影响居中的浮动 */
.mw-parser-output::after {
content: "";
display: table;
clear: both;
}