MediaWiki:Common.css

来自维阿百科
跳转至: 导航搜索

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

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:前往菜单 → 设置(Mac为Opera → Preferences),然后隐私和安全 → 清除浏览数据 → 缓存的图片和文件
/* 这里放置的CSS将应用于所有皮肤 */

/* 信息模板的css */
.infotemplatebox {
    float: right;
    width: 280px;
    font-size: 90%;
    margin: 1em 0 1em 1em;
    background: #f9f9f9;
    border: 1px #999 solid;
    border-collapse: collapse;
    word-break: break-all;
    clear: right;
}

/* 页面底部导航框(2011年8月16日引自中文维基)(所谓大家族模板) */
table.navbox {
    border: 1px solid #aaa;
    clear: both;
    margin: auto;
    padding: 1px;
    text-align: center;
    width: 100%;
}

table.navbox+table.navbox {
    margin-top: -1px;
}

.navbox-title,
.navbox-abovebelow,
table.navbox th {
    padding-left: 1em;
    padding-right: 1em;
    text-align: center;
}

.navbox-group {
    font-weight: 700;
    white-space: nowrap;
}

.navbox,
.navbox-subgroup {
    background: none repeat scroll 0 0 #fdfdfd;
}

.navbox-list {
    border-color: #fdfdfd;
}

.navbox-title,
table.navbox th {
    background: none repeat scroll 0 0 #a5e4a5;
}

.navbox-abovebelow,
.navbox-group,
.navbox-subgroup .navbox-title {
    background: none repeat scroll 0 0 #c0ecc0;
}

.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
    background: none repeat scroll 0 0 #e6f6e6;
}

.navbox-even {
    background: none repeat scroll 0 0 #f5fcf5;
}

.navbox-odd {
    background: none repeat scroll 0 0 transparent;
}
/* 折叠表格的定位处理
body:not(.ns--1):not(.ns--2) .mw-collapsible > tbody > tr:first-child > th:last-child {
    position: relative;
    padding-right: 0;
}
body:not(.ns--1):not(.ns--2) .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child {
    position: relative;
    padding-left: 4em;
    padding-right: 4em;
}
body:not(.ns--1):not(.ns--2) .mw-collapsible > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
    margin: 0 .5em;
}
body:not(.ns--1):not(.ns--2) .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
    position: absolute;
    right: .5em;
    top: .15em;
    float: none;
    margin: 0;
} */

/* 大家族模板下折叠表格的定位处理
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child {
    position: relative;
    padding-right: 0;
    padding-left: 0;
}
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible .mw-collapsible-toggle {
    margin-left: 0;
}
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child > [style*="float:left"] {
    position: absolute;
    left: 1em;
    top: 0;
    float: none;
}
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle {
    position: absolute;
    right: 1em;
    top: 0;
    float: none;
    margin-left: 0;
}
body:not(.ns--1):not(.ns--2) .navbox .mw-collapsible:not(.mw-collapsed) > tbody > tr:first-child > th:last-child > .mw-collapsible-toggle:last-child {
    position: static;
    float: right;
    margin-right: -3.5em;
} */
/* wikitable 的 caption */
.wikitable.mw-collapsible caption {
    border: 1px solid rgba(170, 170, 170, 0.37);
    border-bottom-width: 0;
    background-color: rgb(249, 249, 249);
}

.wikitable.mw-collapsible.mw-collapsed caption {
    border-bottom-width: 1px;
}

/* info类模板 */
.infoBox {
    margin: 0 auto;
    width: 80%;
}
 
.infoBoxTitle {
    margin: 3px auto;
    padding: 0;
    text-align: center;
    font-weight: 700;
}
 
.infoBoxIcon {
    display: table-cell;
    padding: 2px 0 2px .5em;
    vertical-align: middle;
}
 
.infoBoxText {
    display: table-cell;
    padding: .25em .5em .25em 1.3em;
    width: 100%;
    vertical-align: middle;
}
 
.infoBoxContent {
    border: 1px solid #ddd;
    border-left-width: 0;
    background: #fbfbfb;
}
 
.infoBoxBelow {
    margin: 0 auto;
    padding: 0;
    text-align: center;
}
 
/* wikitable green */
table.wikitable-green {
    background: #c9f6e1
}
 
.wikitable-green th {
    background: #13ec93
}
 
.wikitable-green td {
    background: #f3f3f3
}

/* 黑幕模板配合CSS */
/* 把这几行单独拎出来写,否则会被Firefox合并到“.heimu a”这条规则,然后又被上面的“点过外链不变色”规则override */
.heimu,
.heimu rt {
    background-color: #252525;
}
 
span.heimu a.external,
span.heimu a.external:visited,
span.heimu a.extiw,
span.heimu a.extiw:visited {
    color: #252525;
}
 
.heimu,
.heimu a,
a .heimu,
.heimu a.new {
    color: #252525;
    text-shadow: none;
}
 
body:not(.heimu_toggle_on) .heimu:hover,
body:not(.heimu_toggle_on) .heimu:active,
body:not(.heimu_toggle_on) .heimu.off {
    transition: color .13s linear;
    color: white;
}
 
body:not(.heimu_toggle_on) .heimu:hover a,
body:not(.heimu_toggle_on) a:hover .heimu,
body:not(.heimu_toggle_on) .heimu.off a,
body:not(.heimu_toggle_on) a:hover .heimu.off {
    transition: color .13s linear;
    color: lightblue;
}
 
body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off,
body:not(.heimu_toggle_on) .heimu:hover .new {
    transition: color .13s linear;
    color: #FCC;
}

/* Extension:MultimediaViewer的半透明化修改  */
.mw-mmv-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0.73;
}
 
body.mediawiki.mw-mmv-lightbox-open #mw-page-base,
body.mediawiki.mw-mmv-lightbox-open #mw-head-base,
body.mediawiki.mw-mmv-lightbox-open #mw-navigation,
body.mediawiki.mw-mmv-lightbox-open #content,
body.mediawiki.mw-mmv-lightbox-open #footer,
body.mediawiki.mw-mmv-lightbox-open #globalWrapper {
    display: inherit;
}
 
body.mediawiki.mw-mmv-lightbox-open>* {
    display: inherit;
}
 
body.mediawiki.mw-mmv-lightbox-open>script,
body.mediawiki.mw-mmv-lightbox-open>style {
    display: none;
}
 
body.mediawiki.mw-mmv-lightbox-open {
    overflow: hidden;
}
 
body .mw-mmv-wrapper {
    position: fixed;
}
 
/* mutilmediaViewer 信息栏修复 */
.mw-mmv-image-metadata-column.mw-mmv-image-metadata-desc-column {
    width: 30%;
}
 
.mw-mmv-image-metadata-column.mw-mmv-image-metadata-links-column {
    width: 70%;
    max-width: 70%;
}
 
ul.mw-mmv-image-links li {
    float: left;
    padding: .3em 1em;
}
 
div.mw-mmv-image-desc-div,
div.mw-mmv-image-links-div {
    display: block
}
 
div.metadata-panel-is-closed .mw-mmv-image-links li.mw-mmv-license-li {
    height: inherit;
    line-height: inherit;
}
 
.mw-mmv-warning-visible .mw-mmv-download-dialog .mw-mmv-dialog-down-arrow {
    background-color: #ffffff;
}
 
.mw-mmv-warning-visible .mw-mmv-dialog-warning,
.mw-mmv-warning-visible .mw-mmv-download-attribution {
    display: none !important;
}

/* 修正可能的mmv背景错误 */
body .mw-mmv-overlay {
    z-index: 9999;
}

body .mw-mmv-wrapper {
    z-index: 99999;
}