MediaWiki:Common.css

来自维阿百科
霓虹灯鱼讨论 | 贡献2022年7月9日 (六) 10:45的版本
跳转至: 导航搜索

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

  • 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;
}

/* 
 * 放置于这里的CSS将应用于Vector皮肤
 * 请尊重萌娘百科版权,以下代码除非注明均是管理员手敲出来的!!!复制需要注明源自萌娘百科,并且附上URL地址 https://zh.moegirl.org.cn/MediaWiki:Gadget-vector-styles.css
 * 版权协定:知识共享 署名-非商业性使用-相同方式共享 3.0
 * 复制之后请把图片换成自己网站上URL地址!
 */

/* 2022春季topbar */
body.skin-vector {
    background: url(//img.moegirl.org.cn/topbar/10w.png) no-repeat top left #f6f6f6;
}

/* 侧边栏、顶部栏 */
#content {
    position: relative;
    z-index: 7;
}

#mw-navigation div.vectorMenu div.menu {
    z-index: 9;
}

#mw-panel #p-logo {
    width: 176px;
    height: 300px;
    margin-left: -0.5em;
}

#mw-panel #p-logo .mw-wiki-logo {
    background-image: none;
    width: 176px;
    height: 300px;
}

div#mw-page-base {
    background: none;
    height: 100px;
}

#left-navigation,
#right-navigation {
    margin-top: 60px;
}

div#mw-panel {
    top: 0;
    text-shadow: 1px 1px #f6f6f6;
}

div#mw-panel div.portal {
    padding-bottom: 1em;
}

div#mw-head div.vectorMenu h4 {
    height: 1.9em;
    margin-bottom: 0;
    padding-top: 1.25em;
    padding-bottom: 0;
    padding-right: .5em;
}

/* 提升背景颜色纯度 */
div.vectorTabs ul li,
#mw-head div.vectorMenu {
    background-image: none !important;
    background-color: transparent !important;
}

div.vectorTabs,
div.vectorTabs span,
div.vectorTabs ul,
div#mw-head div.vectorMenu h3 {
    background-image: none !important;
}

#left-navigation,
#right-navigation

/* {
    background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .5) 30%, rgba(255, 255, 255, .75))!important;
    background-color: transparent!important;
}*/
,
div.vectorTabs ul li.selected {
    background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .3) 30%, rgba(255, 255, 255, .5)) !important;
    background-color: transparent !important;
}

#left-navigation,
#right-navigation {
    min-height: 40px;
}

/* 右上个人链接栏 */
div#p-personal {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px 5px 0;
    box-shadow: #666 0 1px 5px;
}

/* 右上通知处奇怪的数字移除 */
#pt-notifications-alert .mw-echo-notifications-badge,
#pt-notifications-notice .mw-echo-notifications-badge {
    text-indent: -99999px;
}

#pt-notifications-alert .mw-echo-notifications-badge:after,
#pt-notifications-notice .mw-echo-notifications-badge:after {
    text-indent: 0;
}

/* MW自带10em宽度,应该是留给测试链接的吧萌百没有就去掉 */
#p-personal ul {
    padding-left: 0;
}

/* 调整侧边栏字体 */
div#mw-panel {
    font-size: 18px;
    /* mw-panel的宽度是10em,改了font-size以后也需要修改一下 */
    width: 10.5rem;
}

/* 公告栏滚动Rollnews */
#siteNotice .scrollDiv {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-left: 0 !important;
    height: 1.28rem;
}

#siteNotice .scrollDiv:hover {
    font-weight: 700;
}

#siteNotice .scrollDiv:empty {
    display: none;
}

#siteNotice .scrollDiv>* {
    list-style: none;
    padding-left: 0;
    position: absolute;
    width: 100%;
    top: 1.28rem;
}

#siteNotice .scrollDiv>*:first-child {
    top: 0;
}

#siteNotice .scrollDiv.scrolling.animation,
#siteNotice .scrollDiv.scrolling.animation>* {
    transition: all .37s ease-in-out;
}

/* 页脚 */
#footer-info-copyright {
    background: url(//img.moegirl.org.cn/weixin_mengbai.png) 0 15px no-repeat;
    padding: 15px 0 30px 0;
    font-family: sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    min-height: 165px;
}

#footer-moegirl {
    padding-left: 160px;
    color: #2f2f2f;
}

#footer-moegirl h4 {
    color: #243c4a;
    font: normal normal AllerBold, "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
    margin-bottom: 8px;
}

#footer-moegirl ul {
    float: left;
    margin: 0 100px 20px 0;
    line-height: 1.7;
    width: 120px;
    font-size: 12pt;
}

#footer-moegirl ul.lastlist {
    margin-right: 0;
}

#footer-moegirl ul a {
    color: #2f2f2f;
}

#footer-moegirl .copyright {
    clear: left;
    display: block;
    line-height: 1.3;
    color: #999;
}

/* 标题下划线增强 700 = bold */
h1 {
    font-weight: 700;
    border-bottom: 2px solid #0074f9;
}

h2 {
    font-weight: 700;
    border-bottom: 1px solid #0074f9;
}

/* 名字空间改变背景色 */
.ns-0 div#content,
.ns-0 div#p-cactions li a:hover,
.ns-0 div#p-cactions li.selected a {
    background-color: rgba(255, 255, 255, 0.8);
}

div#content,
div#p-cactions li a:hover,
div#p-cactions li.selected a {
    background-color: rgba(247, 251, 255, 0.8);
}

/* vectorMenu 的排序 */
div.vectorMenu ul {
    display: flex;
    flex-flow: column;
}