MediaWiki:Common.css

来自云望物联wifi图传模块&开发板说明文档
Techzpxp讨论 | 贡献2025年9月30日 (二) 17:31的版本
跳到导航 跳到搜索

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:Ctrl-F5
/* 这里放置的CSS将应用于所有皮肤 */
/* 隐藏首页侧边栏的搜索框 */
.page-Main_Page #p-search {
    display: none;
}
/* ====== 右侧悬浮目录 - 增强调试版 ====== */

/* 调试:为所有TOC添加醒目边框 */
#toc {
    border: 3px solid red !important;
    background: yellow !important;
}

/* 为非首页页面设置悬浮目录 */
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;
    }
}