“MediaWiki:Common.css”的版本间差异

来自云望物联wifi图传模块&开发板说明文档
跳到导航 跳到搜索
标签已被回退
标签已被回退
第5行: 第5行:
}
}
/* ====== 右侧悬浮目录 - 增强调试版 ====== */
/* ====== 右侧悬浮目录 - 增强调试版 ====== */
/* 调试:为所有TOC添加醒目边框 */
#toc {
    border: 3px solid red !important;
    background: yellow !important;
}


/* 为非首页页面设置悬浮目录 */
/* 为非首页页面设置悬浮目录 */

2025年9月30日 (二) 17:43的版本

/* 这里放置的CSS将应用于所有皮肤 */
/* 隐藏首页侧边栏的搜索框 */
.page-Main_Page #p-search {
    display: none;
}
/* ====== 右侧悬浮目录 - 增强调试版 ====== */

/* 为非首页页面设置悬浮目录 */
body:not(.page-Main_Page) #toc {
    position: fixed !important;
    top: 120px !important;
    right: 20px !important;
    width: 280px !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border: 3px solid blue !important; /* 调试用 */
    border-radius: 6px !important;
    padding: 15px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    z-index: 999 !important;
    font-size: 0.9em !important;
    line-height: 1.4 !important;
}

/* 首页隐藏目录 */
.page-Main_Page #toc {
    display: none !important;
}

/* 调整内容区域避免重叠 */
body:not(.page-Main_Page) .mw-body-content {
    margin-right: 320px !important;
    border: 2px dashed green !important; /* 调试用 */
}

/* 移动端适配 */
@media (max-width: 1200px) {
    body:not(.page-Main_Page) #toc {
        position: static !important;
        width: auto !important;
        max-height: none !important;
        margin: 1em 0 !important;
    }
    body:not(.page-Main_Page) .mw-body-content {
        margin-right: 0 !important;
    }
}