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

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
秋绘君留言 | 贡献
无编辑摘要
弃权者留言 | 贡献
无编辑摘要
 
(未显示3个用户的57个中间版本)
第1行: 第1行:
/* ==================================================
/* ==========================================================================
   OGAS 协议架构 - 智能隐身模式 (修正版)
   1. 系统界面清理 & 基础修正
   ================================================== */
   ========================================================================== */
 
#ca-viewsource, #ca-talk {
/* 1. 【核心】隐藏针对路人的“入口”
  解释:#pt-login 是登录连接,#pt-createaccount 是注册。
  只要隐藏这两个,路人就找不到门了。
  注意:千万不要在这里隐藏 #pt-logout 或 #pt-preferences!
*/
#pt-login, #pt-createaccount {
     display: none !important;
     display: none !important;
}
}


/* 2. 隐藏普通用户不需要关心的“页面工具”
pre {
  解释:隐藏历史记录、查看源码、讨论页等
    white-space: pre-wrap;
*/
     overflow-wrap: break-word;
#ca-viewsource, #ca-history, #ca-talk {
     display: none !important;
}
}


/* 3. 隐藏侧边栏的杂项 */
.wikitable {
#t-permalink, #t-info, #t-specialpages, #t-print, #n-help {
    max-width: 100%;
     display: none !important;
     margin: 1em 0;
}
}
/* 4. 隐藏底部版权图标 (为了更像独立网站) */
#footer-poweredbyico {
    display: none !important;
}
/* 【逻辑说明】
  你不需要写“登录后显示 xxx”。
  因为当你登录成功后,MediaWiki 会自动生成 #pt-logout (退出)、
  #pt-userpage (用户页)、#pt-preferences (设置)。
 
  因为上面的第1条代码里没有隐藏这些 ID,
  所以一旦你登录,它们自然会显示出来给指挥官你看!
*/
/* 一点样式代码测试 */


/* ==========================================================================
/* ==========================================================================
   1. 萌百特色:黑幕 (Heimu)
   2. 交互组件:黑幕 (Heimu)
   用法:<span class="heimu">这里是剧透内容</span>
   .heimu, .heimu rt {
  ========================================================================== */
     background-color: var(--color-base, #252525);
.heimu, .heimu rt {
     color: var(--color-base, #252525);
     background-color: #252525;
     transition: color 0.13s linear;
    color: #252525; /* 初始颜色与背景一致 */
     text-shadow: none;
     text-shadow: none;
    transition: color 0.13s linear, background-color 0.13s linear;
    user-select: none;
}
}
.heimu a, a .heimu, .new .heimu {
.heimu a, a .heimu, .new .heimu {
     transition: color 0.13s linear;
     color: var(--color-base, #252525);
    color: #252525;
}
}
/* 鼠标悬停显示 */
span.heimu:hover, span.heimu:active {
span.heimu:hover, span.heimu:active { color: #ffffff !important; }
    background-color: transparent;
span.heimu:hover a, a:hover span.heimu { color: #add8e6 !important; }
    color: var(--color-base--inverted, #ffffff) !important;
span.heimu:hover a:visited { color: #c5cae9 !important; }
    user-select: text;
}
span.heimu:hover a, a:hover span.heimu { color: var(--color-primary, #add8e6) !important; }
  ========================================================================== */
 


/* ==========================================================================
/* ==========================================================================
   2. 选项卡组件 (Tabs)
   3. 现代矩形自适应导航 (核心逻辑 - 彻底净化版)
  用于切换“立绘/重创/心智升级”
   ========================================================================== */
   ========================================================================== */
/* 容器 */
.Tabs { display: block; margin: 1em 0; clear: both; }


/* 标签栏 */
/* 3.1 基础显隐逻辑 */
.TabLabel { display: flex; flex-wrap: wrap; border-bottom: 2px solid #aaa; }
.adaptive-nav input[type="radio"] { display: none !important; }
.nav-content {
    display: none;
    overflow: hidden;
    background: var(--color-surface-2, rgba(0, 0, 0, 0.05));
    border-radius: 10px;
    margin-bottom: 10px;
}
/* 强制显示展开的内容 */
.nav-content:not(.mw-collapsed) { display: block !important; }


/* 标签:让它看起来像个按钮 */
/* 3.2 矩形卡片 (彻底清洗 Citizen 皮肤样式) */
.TabLabelText {
.nav-text-btn.mw-customtoggle {
     padding: 8px 16px;
     all: unset !important; /* 抹除皮肤默认按钮样式 */
    position: relative;
     cursor: pointer;
     cursor: pointer;
     border: 1px solid #aaa;
    display: flex !important;
     border-bottom: none;
    align-items: center;
     margin-right: 4px;
    justify-content: flex-start;
     background: #f8f9fa;
    height: 64px;
    padding: 0 24px !important;
    font-weight: bold;
    font-size: 18px;
    color: var(--color-base, #333) !important; /* 没图时文字深色 */
    border-radius: 10px;
    background-color: transparent !important; /* 默认背景透明 */
     border: 1px solid var(--border-color-base, rgba(0,0,0,0.1)) !important;
     border-bottom: 4px solid rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s ease;
     overflow: hidden;
     box-sizing: border-box !important;
}
}


/* 选中状态 */
/* 杀死文字内部可能的任何蓝色背景 */
.TabLabelText.selected {
.nav-text-btn span {
     background: #fff;
     background: transparent !important;
     font-weight: bold;
     padding: 0 !important;
     margin-bottom: -2px;
     border: none !important;
     border-bottom: 2px solid #fff;
     box-shadow: none !important;
     /* 这里的颜色你可以通过模板参数控制,或者手动加个 border-top */
     z-index: 2;
}
}


/* 内容显示控制 */
/* 只有带 has-bg-image 类名时才显示的遮罩 */
.TabContent { border: 1px solid #aaa; border-top: none; padding: 15px; }
.nav-text-btn.has-bg-image::before {
.TabContentText { display: none; }
    content: "";
.TabContentText.selected { display: block; }
     position: absolute;
 
     top: 0; left: 0; width: 100%; height: 100%;
 
     background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
.TabContent {
     z-index: 1;
     min-height: 50px; /* 根据你少前立绘的平均高度设置 */
     transition: min-height 0.3s ease; /* 增加平滑过渡 */
}
 
 
 
/* ==========================================================================
  2. 导航箱 (Navbox) - 仅保留布局,颜色交给模板
  ========================================================================== */
table.navbox {
    border: 1px solid #aaa;
    width: 100%;
    margin: auto;
     clear: both;
    font-size: 88%;
     text-align: center;
    border-collapse: collapse;
}
}
.nav-text-btn.has-bg-image { color: #fff !important; }
.nav-text-btn.has-bg-image span { text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }


/* 移除原本固定的 background 设置,允许模板参数生效 */
/* 3.3 交互反馈 */
.navbox-title,
.nav-text-btn:hover { border-color: var(--color-primary, #36c) !important; background-color: rgba(0,0,0,0.02) !important; }
table.navbox th {
.nav-text-btn:active { transform: translateY(2px); border-bottom-width: 1px !important; }
    padding-left: 1em; /* [cite: 82] */
    padding-right: 1em; /* [cite: 82] */
    text-align: center; /* [cite: 82] */
}


.navbox-group {
/* 3.4 背景预留区 */
    font-weight: bold; /* [cite: 82] */
.btn-bg-1, .btn-bg-2, .btn-bg-3, .btn-bg-4 { background-size: cover; background-position: center; }
    white-space: nowrap; /* [cite: 82] */
    padding: 0 10px;
}


.navbox-list {
    border-color: #fdfdfd; /* [cite: 83] */
}
/* ==========================================================================
/* ==========================================================================
   4. 侧边信息栏 (InfoBox)
   4. 自适应逻辑 (PC网格 vs 移动端手风琴)
  角色属性、数值面板基础
   ========================================================================== */
   ========================================================================== */
.infotemplatebox {
@media (min-width: 769px) {
     float: right;
     .adaptive-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
    width: 280px;
     .nav-module { display: contents; }
    font-size: 90%;
     .nav-text-btn { grid-row: 1; }
    margin: 0 0 1em 1em;
     .nav-content { grid-row: 2; grid-column: 1 / 5; margin-top: 10px; }
     background: #f9f9f9;
     border: 1px solid #999;
     border-collapse: collapse;
    clear: right;
}
}
.infoBoxTitle {
@media (max-width: 768px) {
     background: #deede0;
     .adaptive-nav { display: block; }
     color: #228b22;
     .nav-module { margin-bottom: 8px; }
     text-align: center;
     .nav-text-btn { width: 100%; }
     font-weight: bold;
     .nav-content { border-radius: 0 0 10px 10px; margin-top: -4px; border: 1px solid rgba(0, 0, 0, 0.1); border-top: none; }
    padding: 5px;
}
}
/* ==========================================================================
/* ==========================================================================
   5. 通用修正
   4. 自适应分屏逻辑 (PC网格 vs 移动端手风琴)
  防止图片溢出、强制换行等运维小优化
   ========================================================================== */
   ========================================================================== */
pre {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}
.wikitable {
    max-width: 100%;
    margin: 1em 0;
}


/* 隐藏单选框本身 */
/* PC端:横向排列按钮,内容横跨整行 */
.tab-container input[type="radio"] {
@media (min-width: 769px) {
     display: none;
    .adaptive-nav {
}
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin: 20px 0;
    }
     .nav-module { display: contents; }
    .nav-text-btn { grid-row: 1; }
    .nav-content {
        grid-row: 2;
        grid-column: 1 / 5;
        margin-top: 10px;
        border: 1px solid var(--border-color-base, rgba(255, 255, 255, 0.1));
    }


/* 标签栏容器 */
    #game-1:checked ~ .nav-module #content-1,
.tab-labels {
     #game-2:checked ~ .nav-module #content-2,
     display: flex;
     #game-3:checked ~ .nav-module #content-3,
     border-bottom: 2px solid #36c;
     #game-4:checked ~ .nav-module #content-4 {
     margin-bottom: 10px;
        display: block;
    }
}
}


/* 单个标签样式 */
/* 移动端:按钮堆叠,内容就地展开 */
.tab-labels label {
@media (max-width: 768px) {
     padding: 10px 20px;
     .adaptive-nav { display: block; padding: 0 5px; }
     cursor: pointer;
     .nav-module { margin-bottom: 8px; }
     background: #f8f9fa;
     .nav-text-btn { width: 100%; }
     border: 1px solid #ddd;
     .nav-content {
    border-bottom: none;
        border-radius: 0 0 10px 10px;
    margin-right: 5px;
        margin-top: -4px;
    transition: 0.3s;
        border: 1px solid rgba(0, 0, 0, 0.1);
}
        border-top: none;
    }


.tab-labels label:hover {
    /* 移动端特殊:由于 display: contents 失效,直接按顺序显示内容 */
     background: #eaecf0;
    #game-1:checked ~ .nav-module:nth-of-type(1) #content-1,
    #game-2:checked ~ .nav-module:nth-of-type(2) #content-2,
    #game-3:checked ~ .nav-module:nth-of-type(3) #content-3,
     #game-4:checked ~ .nav-module:nth-of-type(4) #content-4 {
        display: block;
    }
}
}


/* 选中状态的样式 */
/* ==========================================================================
#tab1:checked ~ .tab-labels label[for="tab1"],
  5. 首页网格与内容样式 (原本保留)
#tab2:checked ~ .tab-labels label[for="tab2"],
  ========================================================================== */
#tab3:checked ~ .tab-labels label[for="tab3"] {
.home-grid {
     background: #36c;
     display: grid;
     color: white;
     grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
     font-weight: bold;
     gap: 16px;
}
}


/* 内容区域默认隐藏 */
.home-card {
.tab-content {
     background: var(--color-surface-1);
     display: none;
     border: 1px solid var(--border-color-base);
     padding: 15px;
     border-radius: 12px;
     border: 1px solid #ddd;
    padding: 24px;
     border-top: none;
     transition: all 0.3s ease;
}
}


/* 根据选中的 radio 显示对应的内容 */
.nav-sub-text {
#tab1:checked ~ #content1,
     margin-top: 12px;
#tab2:checked ~ #content2,
     font-weight: 600;
#tab3:checked ~ #content3 {
     font-size: 14px;
    display: block;
    color: var(--color-base);
}
/* 1. 隐藏系统默认的黑三角,并让鼠标放上去变成小手 */
.home-game-fold summary {
     list-style: none; /* 隐藏标准浏览器的三角 */
     cursor: pointer;
     margin-bottom: 10px; /* 图标之间留点空隙 */
}
.home-game-fold summary::-webkit-details-marker {
    display: none; /* 隐藏苹果/谷歌浏览器的三角 */
}
}


/* 2. 给展开的内容加上丝滑的浮现动画 */
@keyframes slideIn {  
.home-game-fold[open] .fold-content {
     from { opacity: 0; transform: translateY(-5px); }
     animation: slideDownFade 0.3s ease-out; /* 0.3秒的动画时间 */
     to { opacity: 1; transform: translateY(0); }
    padding: 10px;
     margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.03); /* 给展开的区域加个极淡的背景色,区分层次(不需要可删除) */
    border-radius: 8px; /* 加个圆角更像 App */
}
}


/* 3. 定义具体的动画过程:从上面稍微滑下来,并从透明变清晰 */
#custom-notetip-popup {
@keyframes slideDownFade {
     position: absolute;
     from {
    display: none;
        opacity: 0;
    z-index: 10000;
        transform: translateY(-10px);
     background: #fff;
     }
     border: 1px solid #a2a9b1;
     to {
    padding: 6px 10px;
        opacity: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        transform: translateY(0);
     font-size: 14px;
     }
    pointer-events: none;
    max-width: 300px;
    line-height: 1.5;
}
}

2026年5月10日 (日) 10:23的最新版本

/* ==========================================================================
   1. 系统界面清理 & 基础修正
   ========================================================================== */
#ca-viewsource, #ca-talk {
    display: none !important;
}

pre {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.wikitable {
    max-width: 100%;
    margin: 1em 0;
}

/* ==========================================================================
   2. 交互组件:黑幕 (Heimu)
   .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; }
   ========================================================================== */


/* ==========================================================================
   3. 现代矩形自适应导航 (核心逻辑 - 彻底净化版)
   ========================================================================== */

/* 3.1 基础显隐逻辑 */
.adaptive-nav input[type="radio"] { display: none !important; }
.nav-content {
    display: none;
    overflow: hidden;
    background: var(--color-surface-2, rgba(0, 0, 0, 0.05));
    border-radius: 10px;
    margin-bottom: 10px;
}
/* 强制显示展开的内容 */
.nav-content:not(.mw-collapsed) { display: block !important; }

/* 3.2 矩形卡片 (彻底清洗 Citizen 皮肤样式) */
.nav-text-btn.mw-customtoggle {
    all: unset !important; /* 抹除皮肤默认按钮样式 */
    position: relative;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    height: 64px;
    padding: 0 24px !important;
    font-weight: bold;
    font-size: 18px;
    color: var(--color-base, #333) !important; /* 没图时文字深色 */
    border-radius: 10px;
    background-color: transparent !important; /* 默认背景透明 */
    border: 1px solid var(--border-color-base, rgba(0,0,0,0.1)) !important;
    border-bottom: 4px solid rgba(0, 0, 0, 0.15) !important;
    transition: all 0.2s ease;
    overflow: hidden;
    box-sizing: border-box !important;
}

/* 杀死文字内部可能的任何蓝色背景 */
.nav-text-btn span {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 2;
}

/* 只有带 has-bg-image 类名时才显示的遮罩 */
.nav-text-btn.has-bg-image::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}
.nav-text-btn.has-bg-image { color: #fff !important; }
.nav-text-btn.has-bg-image span { text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }

/* 3.3 交互反馈 */
.nav-text-btn:hover { border-color: var(--color-primary, #36c) !important; background-color: rgba(0,0,0,0.02) !important; }
.nav-text-btn:active { transform: translateY(2px); border-bottom-width: 1px !important; }

/* 3.4 背景预留区 */
.btn-bg-1, .btn-bg-2, .btn-bg-3, .btn-bg-4 { background-size: cover; background-position: center; }

/* ==========================================================================
   4. 自适应逻辑 (PC网格 vs 移动端手风琴)
   ========================================================================== */
@media (min-width: 769px) {
    .adaptive-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
    .nav-module { display: contents; }
    .nav-text-btn { grid-row: 1; }
    .nav-content { grid-row: 2; grid-column: 1 / 5; margin-top: 10px; }
}
@media (max-width: 768px) {
    .adaptive-nav { display: block; }
    .nav-module { margin-bottom: 8px; }
    .nav-text-btn { width: 100%; }
    .nav-content { border-radius: 0 0 10px 10px; margin-top: -4px; border: 1px solid rgba(0, 0, 0, 0.1); border-top: none; }
}
/* ==========================================================================
   4. 自适应分屏逻辑 (PC网格 vs 移动端手风琴)
   ========================================================================== */

/* PC端:横向排列按钮,内容横跨整行 */
@media (min-width: 769px) {
    .adaptive-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin: 20px 0;
    }
    .nav-module { display: contents; }
    .nav-text-btn { grid-row: 1; }
    .nav-content { 
        grid-row: 2; 
        grid-column: 1 / 5; 
        margin-top: 10px;
        border: 1px solid var(--border-color-base, rgba(255, 255, 255, 0.1));
    }

    #game-1:checked ~ .nav-module #content-1,
    #game-2:checked ~ .nav-module #content-2,
    #game-3:checked ~ .nav-module #content-3,
    #game-4:checked ~ .nav-module #content-4 {
        display: block;
    }
}

/* 移动端:按钮堆叠,内容就地展开 */
@media (max-width: 768px) {
    .adaptive-nav { display: block; padding: 0 5px; }
    .nav-module { margin-bottom: 8px; }
    .nav-text-btn { width: 100%; }
    .nav-content {
        border-radius: 0 0 10px 10px;
        margin-top: -4px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-top: none;
    }

    /* 移动端特殊:由于 display: contents 失效,直接按顺序显示内容 */
    #game-1:checked ~ .nav-module:nth-of-type(1) #content-1,
    #game-2:checked ~ .nav-module:nth-of-type(2) #content-2,
    #game-3:checked ~ .nav-module:nth-of-type(3) #content-3,
    #game-4:checked ~ .nav-module:nth-of-type(4) #content-4 {
        display: block;
    }
}

/* ==========================================================================
   5. 首页网格与内容样式 (原本保留)
   ========================================================================== */
.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;
}

.nav-sub-text {
    margin-top: 12px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-base);
}

@keyframes slideIn { 
    from { opacity: 0; transform: translateY(-5px); } 
    to { opacity: 1; transform: translateY(0); } 
}

#custom-notetip-popup {
    position: absolute;
    display: none;
    z-index: 10000;
    background: #fff;
    border: 1px solid #a2a9b1;
    padding: 6px 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 14px;
    pointer-events: none;
    max-width: 300px;
    line-height: 1.5;
}