MediaWiki:Common.css

来自神国反恶俗
七叶​(留言 | 贡献)2026年10月11日 (日) 14:41的版本
跳到导航跳到搜索

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

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
  • Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* 这里放置的CSS将应用于所有皮肤 */

/* 目录(TOC):去掉默认的浮动与边框 */
.mw-table-of-contents-container,
.mw-table-of-contents,
#toc,
.toc {
    float: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font-size: 1em;
}

#p-toc .pBody {
    max-height: 70vh;
    overflow-y: auto;
    font-size: 0.9em;
    line-height: 1.6;
}

#p-toc ul {
    margin: 0;
    padding-left: 1.6em;
}

#p-toc .toctitle,
#p-toc .mw-table-of-contents__heading,
#p-toc .mw-table-of-contents-header {
    display: none;
}

/* 顶部一条通栏:左编辑标签 / 右账号 */
.sg-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 401;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    padding: 3px 12px;
    font-size: 87%;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
}

.sg-bar-left {
    flex: 0 1 auto;
    overflow: hidden;
}

.sg-bar-right {
    flex: 0 0 auto;
    margin-left: auto;
}

.sg-sticky-bar a {
    color: #36c;
    text-decoration: none;
    padding: 2px 7px;
    display: inline-block;
}

.sg-sticky-bar a:hover {
    text-decoration: underline;
}

/* 左侧栏:吸顶 + 上下滑动条 */
#column-one {
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 正文让开顶部 */
body.sg-sticky-on #content {
    padding-top: 36px !important;
}