MediaWiki:Mobile.css
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
/* 这里放置的CSS将影响使用移动版网站的用户 */
/***** 颜色变量 *****/
/** 这部分代码可能造成MediaWiki报错,但对现代浏览器的使用并无影响 **/
body {
--lightpurple: #F7F1FC;
--purple: #C794F6;
--darkpurple: #A443DF;
--lightgreen: #F9FFEA;
--green: #B9E66B;
--darkgreen: #84B63C;
--lightblue: #EBF7FE;
--blue: #85C1F7;
--darkblue: #4487DF;
--lightyellow: #FEF9DE;
--yellow: #F9E179;
--darkyellow: #F1BD4C;
--lightorange: #FFF7ED;
--orange: #F4C89C;
--darkorange: #E7815C;
--lightred: #FDF5F5;
--red: #F3ACAA;
--darkred: #E7615C;
/* 道具等级颜色 */
--normal-grey: grey;
--basic-green: #D3DB2E;
--primary-blue: #09B3F7;
--middle-purple: #D8B3D8;
--high-orange: orange;
/* 文字颜色 */
--raw-text: #FFFFFF; /* 黑色背景文本 */
--senior: #FF6237;
--limited: #32CD32;
--extra-talent: #F49800; /* 天赋效果增强 */
--additon-title: #0098DC; /* 特性、要求等文本 */
--base-addition: #00B0FF; /* 加成蓝色 */
--alert: #FF0000;
/* 基建颜色 */
--clue: #FF6237;
--production: #FFC90E;
--trade: #00B0FF;
--dorm: #00FFFF;
--machining: #CFF150; /* 取色 */
--connection: gray; /* 取色 */
--train: #7D0121; /* 取色 */
--center: #015652; /* 取色 */
/* 移动版专用 */
--mobile-theme: #343434;
}
/* 隐藏移动端页面底部的讨论按钮 */
.talk {
display: none !important;
}
/* 懒加载渐入 */
.lazyload,
.lazyloading {
opacity: 0;
}
.lazyloaded {
opacity: 1;
transition: opacity 300ms;
}
/*模糊样式*/
.fuzzy {filter:blur(3px); text-shadow: 0px 0px 5px white;transition: all 0.1s ease-in-out;}
.fuzzy:hover {filter:none;text-shadow:none;}
/*热门评论*/
.comment-container-top>div:not(.comment-thread) {
background-color: rgba(68,135,223,0.8) !important;
color: white !important;
font-weight: bolder !important;
}
.comment-thread.comment-popular {
background-color: rgba(68,135,223,0.1) !important;
}
/* 评论边距 */
.comment-container-top,
.comment-container {
margin-left: 2% !important;
margin-right: 2% !important;
}
img, object {
max-width: 100%;
height: auto;
}
/* 反转顶栏图标颜色 */
#mw-mf-main-menu-button:before, #searchIcon:before, #user-notifications:before{
filter: invert(1);
}
/* 反转顶栏文本颜色 */
.minerva-header > .branding-box > a > span{
color: white!important;
}
/*筛选工具样式*/
.filterable-button {
float: right;
color: black;
padding: 0 2px 0 0.5em;
text-shadow: none;
transition: all 1250ms cubic-bezier(0.19, 1, 0.22, 1);
cursor: pointer;
}
.filterable-button:hover {
text-shadow: 1px 1px 2px #888;
}
.filterable-button-active {
color: black;
}
.filterable-input-group {
position: absolute;
max-width: 45vw;
display: none;
}
.filterable-input-group .list-group-item input {
vertical-align: text-bottom;
margin: 0 5px 0 0;
}
.filterable-input-group .dropdown-content {
padding: 0 10px;
}
.filterable-input-group .dropdown-content .list-group-item {
/* overflow: hidden; */
white-space: nowrap;
text-overflow: ellipsis;
}
.filterable-input-group .list-group {
margin-bottom: 10px;
max-height: 206px;
overflow-y: auto;
}
.dropdown-menu {
padding: 7px;
position: absolute;
top: 100%;
left: 0;
z-index: 95;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
list-style: none;
font-size: 14px;
text-align: left;
background-color: #ffffff;
border: 1px solid #cccccc;
border:
1px solid rgba(0, 0, 0, 0.15);
border-radius: 0;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
background-clip: padding-box;
}
.dropdown-menu.pull-right {
right: 0;
left: auto;
}
.dropdown-menu .divider {
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
}
.dropdown-menu>li>a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #333333;
white-space: nowrap;
}
.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus {
text-decoration: none;
color: #262626;
background-color: #f5f5f5;
}
.dropdown-menu>.active>a, .dropdown-menu>.active>a:hover, .dropdown-menu>.active>a:focus {
color: #ffffff;
text-decoration: none;
outline: 0;
background-color: #337ab7;
}
.dropdown-menu>.disabled>a, .dropdown-menu>.disabled>a:hover, .dropdown-menu>.disabled>a:focus {
color: #777777;
}
.dropdown-menu>.disabled>a:hover, .dropdown-menu>.disabled>a:focus {
text-decoration: none;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
cursor: not-allowed;
}
.btn-group-sm {
display: inline-block;
}
.dropdown-menu {
padding: 7px;
}
.mw-collapsible-toggle {
position: relative;
Z-index: 50;
}
/* 表格强制不换行,使用最小字体 */
.wikitable {
white-space: nowrap;
}
table.wraptable {
white-space: normal;
}
/* 表格内图片设置最小宽度*/
.wikitable img {
min-width: 24px;
}
/* Minerva隐藏Vector元素 */
.skin-minerva .nomobile {
display: none !important;
}
/* plainlist & plainlinks */
.plainlist ul {
list-style: none;
padding-left: 0;
}
.plainlinks a {
background: none !important;
padding: 0 !important;
}
/* 模板:半折叠 */
.template-semicollapse {
display: block;
overflow-x: auto;
}
.template-semicollapse-content {
overflow-y: hidden;
max-height: 400px;
padding: 1px;
-webkit-mask-image: linear-gradient(black 80%, transparent);
mask-image: linear-gradient(black 80%, transparent);
}
.template-semicollapse-button {
display: block;
width: 200px;
margin: auto;
margin-top: 8px;
border-radius: 4px;
background-color: #4487DF;
color: white;
text-align: center;
padding: 4px;
font-size: 20px;
cursor: pointer;
}
.template-semicollapse-button:hover {
background: #85C1F7;
text-decoration: none;
}
/* *** */
body.page-首页 div#block-basenav tbody {
vertical-align: top;
}
body.page-首页_sandbox div#block-basenav tbody {
vertical-align: top;
}
/** 引用自萌娘百科 https://zh.moegirl.org/MediaWiki:Mobile.css
.heimu, .heimu a, a .heimu, .heimu a.new {
background-color: #252525;
color: #252525;
text-shadow: none;
}
.heimu:hover, .heimu:active {
color: white;
}
.heimu:hover a, a:hover .heimu {
color: lightblue;
}
.heimu:hover .new, .heimu .new:hover, .new:hover .heimu {
color: #BA0000;
}
.content h2 {
font-weight: bold;
}
.toc-mobile>div>ul>li{
font-weight: bold;
}
.toc-mobile>div>ul>li>ul>li{
font-weight: normal;
}
**/
/* 黑幕 */
.heimu, .heimu a, a .heimu, .heimu a.new {
background-color: #252525;
color: #252525;
text-shadow: none;
}
.heimu:hover, .heimu:active {
color: white;
}
.heimu:hover a, a:hover .heimu {
color: lightblue;
}
.heimu:hover .new, .heimu .new:hover, .new:hover .heimu {
color: #BA0000;
}
/** tl-splink **/
.tl-splink a,
.tl-splink a:visited,
.tl-splink a:hover {
border-bottom: dashed 1px;
}
/** pathnav2 **/
.pathnav2-center a,
.pathnav2-center a:visited {
color: white;
}
/** 隐藏登录后的首页欢迎语 **/
body.page-Main_Page.is-authenticated .pre-content {
display: none !important;
}
/* 使行宽占满表格 */
th.fullline,
td.fullline {
width: 850px;
}
/* 侧栏调整 */
.navigation-enabled #mw-mf-viewport {
overflow: hidden;
min-height: 100%;
height: 100% !important;
}
nav#mw-mf-page-left {
height: 100%
}
nav#mw-mf-page-left>.menu.view-border-box {
overflow-x: hidden;
overflow-y: scroll;
height: 100%;
position: relative;
}
nav ul li a:hover {
box-shadow: inset 5px 0 0 0 var(--senior);
text-decoration: none;
}
nav .mw-parser-output ul li a {
font-weight: bold;
line-height: 1.857;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
nav .mw-parser-output ul li a>i {
margin-right: 0.76em;
font-size: 1.4em;
vertical-align: middle;
width: 24px;
text-align: center;
}
/* 顶栏颜色 */
.header-container {
background-color: var(--mobile-theme) !important;
}
.branding-box>h1:nth-child(1)>span:nth-child(1) {
color: #FFFFFF;
}
.overlay-header .overlay-title {
color: #FFFFFF;
}
/* 通知样式 */
.mw-echo-ui-notificationsInboxWidget-toolbarWrapper {
background: transparent !important;
}
.overlay-header h2>* {
color: #333 !important;
}
.notification-count {
background: transparent !important;
}
/* 首页背景调整 */
body.page-首页>#mw-mf-viewport>#mw-mf-page-center>#content,
body.page-首页_sandbox>#mw-mf-viewport>#mw-mf-page-center>#content {
background-color: #f8f8f8;
}
/* 隐藏首页和sandbox顶部内容 */
body.page-首页 .pre-content,
body.page-首页_sandbox .pre-content {
display: none;
}
/* 隐藏首页和sandbox的编辑按钮 */
body.page-首页 .edit-page,
body.page-首页_sandbox .edit-page {
display: none;
}
/* 隐藏首页和sandbox目录 */
body.page-首页 .toc-mobile,
body.page-首页_sandbox .toc-mobile {
display: none;
}
/* 隐藏首页和sandbox讨论按钮 */
body.page-首页 #page-secondary-actions,
body.page-首页_sandbox #page-secondary-actions {
display: none;
}
/* 隐藏首页和sandbox最后编辑栏 */
body.page-首页 .last-modified-bar,
body.page-首页_sandbox .last-modified-bar {
display: none;
}
/* 缩小显示表格 */
table.scaletable {
transform: scale(0.5);
transform-origin: top left;
width: 200% !important;
}
/* Infobox */
infobox {
position: relative;
border: 1px solid #eaecf0;
margin-bottom: 2em;
background-color: #f8f9fa;
display: flex;
flex: 1 1 100%;
flex-flow: column nowrap;
}
.infobox td,
.infobox th {
vertical-align: top;
}
.infobox th {
background-color: #eaecf0;
}
.infobox caption {
font-size: larger;
}
.infobox.bordered {
border-collapse: collapse;
}
.infobox.bordered td,
.infobox.bordered th {
border: 1px solid #a2a9b1;
}
.infobox.bordered .borderless td,
.infobox.bordered .borderless th {
border: 0;
}
/* 临时修正section问题 */
section.lst {
display: none;
}
/* 修正结构式讨论在移动设备上无法点击的问题 */
.flow-ui-load-overlay {
pointer-events: none;
}
/* 在页面标题后增加复制URL按钮 */
body:not(.ns--1) h1#firstHeading {
pointer-events: none;
cursor: text;
}
body:not(.ns--1) h1#firstHeading::after {
content: "\f0c1";
font-family: 'Font Awesome 5 Free';
font-weight: 900;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
font-size: 70%;
margin-left: .4em;
color: var(--blue);
pointer-events: auto;
cursor: pointer;
}
/*手机端*/
@media screen and (max-width: 640px) {
body {
font-size: small;
}
.wikitable,
.infobox {
font-size: x-small
}
}
/*** 全站灰阶 ***/
/*
html {
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-webkit-filter: grayscale(1);
filter: gray;
}
*/
.mw-collapsible-dark th{
background:#343434!important;
color:#fff
}
.mw-collapsible-dark .mw-collapsible-text{
color: #ff8f00;
}
/******************************************************************************/
/* Default style for navigation boxes from Wikipedia*/
.navbox { /* Navbox container style */
border: 1px solid #a2a9b1;
width: 100%;
margin: auto;
clear: both;
font-size: 88%;
text-align: center;
padding: 1px;
}
.navbox-inner,
.navbox-subgroup {
width: 100%;
}
.navbox th,
.navbox-title,
.navbox-abovebelow {
text-align: center; /* Title and above/below styles */
padding-left: 1em;
padding-right: 1em;
}
th.navbox-group { /* Group style */
white-space: nowrap;
/* @noflip */
text-align: right;
}
.navbox,
.navbox-subgroup {
background: #fdfdfd; /* Background color */
}
.navbox-list {
border-color: #fdfdfd; /* Must match background color */
}
.navbox th,
.navbox-title {
background: #4487DF; /* Level 1 color */
}
.navbox-title a,
.navbox-title div{
color: white;
}
.navbox-abovebelow,
th.navbox-group,
.navbox-subgroup .navbox-title {
background: #85C1F7; /* Level 2 color */
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
background: #EBF7FE; /* Level 3 color */
}
.navbox-even {
background: #f7f7f7; /* Even row striping */
}
.navbox-odd {
background: transparent; /* Odd row striping */
}
table.navbox + table.navbox { /* Single pixel border between adjacent navboxes */
margin-top: -1px; /* (doesn't work for IE6, but that's okay) */
}
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
padding: 0.125em 0; /* Adjust hlist padding in navboxes */
}
.navbox .hlist dd,
.navbox .hlist dt,
.navbox .hlist li {
white-space: nowrap; /* Nowrap list items in navboxes */
white-space: normal !ie; /* IE < 8 no-wraps entire list, so disable it */
}
.navbox .hlist dd dl,
.navbox .hlist dt dl,
.navbox .hlist li ol,
.navbox .hlist li ul {
white-space: normal; /* But allow parent list items to be wrapped */
}
ol + table.navbox,
ul + table.navbox {
margin-top: 0.5em; /* Prevent lists from clinging to navboxes */
}
/* Default styling for Navbar template */
.navbar {
display: inline;
font-weight: normal;
}
.navbar ul {
display: inline;
white-space: nowrap;
}
.navbar li {
word-spacing: -0.125em;
}
.navbar.mini li abbr[title] {
font-variant: small-caps;
border-bottom: none;
text-decoration: none;
cursor: inherit;
}
/* Navbar styling when nested in navbox */
.navbox .navbar {
display: block;
}
.navbox-title .navbar {
/* @noflip */
float: left;
/* @noflip */
text-align: left;
/* @noflip */
margin-right: 0.5em;
width: 8em;
}
/* 'show'/'hide' buttons created dynamically by the CollapsibleTables javascript
in [[MediaWiki:Common.js]] are styled here so they can be customised. */
.collapseButton {
/* @noflip */
float: right;
font-weight: normal;
/* @noflip */
margin-left: 0.5em;
/* @noflip */
text-align: right;
width: auto;
}
/* In navboxes, the show/hide button balances the v·d·e links
from [[Template:Navbar]], so they need to be the same width. */
.navbox .collapseButton {
width: 8em;
}
/* For display uneditable section */
.noedit .editsection, .noedit .mw-editsection
{
display: none;
}
/* Style for horizontal lists (separator following item) */
.skin-monobook .hlist dl,
.skin-modern .hlist dl,
.skin-vector .hlist dl {
line-height: 1.5em;
}
.hlist dl,
.hlist ol,
.hlist ul {
margin: 0;
}
.hlist dd,
.hlist dt,
.hlist li {
display: inline;
margin: 0;
}
/* Display nested lists inline */
.hlist dl dl,
.hlist ol ol,
.hlist ul ul {
display: inline;
}
/* Generate interpuncts */
.hlist dt:after {
content: " :";
}
.hlist dd:after,
.hlist li:after {
content: " · ";
font-weight: bold;
}
.hlist dd:last-child:after,
.hlist dt:last-child:after,
.hlist li:last-child:after {
content: none;
}
/* for IE 8 */
.hlist dd.nopunct:after,
.hlist dt.nopunct:after,
.hlist li.nopunct:after {
content: none;
}
/* Add parens around nested lists */
.hlist dl dl:before,
.hlist ol ol:before,
.hlist ul ul:before {
content: "(";
}
.hlist dl dl:after,
.hlist ol ol:after,
.hlist ul ul:after {
content: ")";
}
/* Put numbers in ordered lists */
.hlist.hnum ol li {
counter-increment: level1;
}
.hlist.hnum ol li:before {
content: counter(level1) " ";
}
.hlist.hnum ol ol li {
counter-increment: level2;
}
.hlist.hnum ol ol li:before {
content: counter(level2) " ";
}
/* Unbulleted lists */
.plainlist ul {
line-height: inherit;
list-style: none none;
margin: 0;
}
.plainlist ul li {
margin-bottom: 0;
}
.same-bg {
background: none
}