MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
小 |
小 |
||
| 第630行: | 第630行: | ||
} | } | ||
/* 移动端infobox不浮动,居中显示 */ | /* 移动端infobox不浮动,居中显示 */ | ||
2025年12月4日 (四) 15:10的最新版本
/* 这里放置的CSS将应用于所有皮肤 */
/* 信息框图片位置随设备调整 */
@media all and ( min-width: 720px ) {
.toppic {
display: none;
}
}
@media all and ( max-width: 720px ) {
.sidepic {
display: none;
}
}
/* 防止pre模块溢出使得文本不可读*/
pre {overflow-x: auto;}
code, pre {word-break: break-word;}
/* 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: 6em;
}
.navbox { /* Navbox container style */
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: #9EDBF7; /* Level 1 color */
}
.navbox-abovebelow,
th.navbox-group,
.navbox-subgroup .navbox-title {
background: #AEE0F7; /* Level 2 color */
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
background: #C5E8FB; /* 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 */
}
.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 */
}
/* '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: 6em;
}
/* Default styling for Infobox template */
.infobox-title {
background: #53D6FF; /* Level 1 color */
}
.infobox-above,
.infobox-below {
background: #9EDBF7; /* Level 2 color */
}
.infobox-header {
background: #AEE0F7; /* Level 3 color */
}
.infobox-label {
background: #C5E8FB; /* Level 4 color */
}
/*隐藏首页标题*/
.page-首页 .mw-side,
.page-首页 .firstHeading,
.page-首页 #siteSub {display:none;}
.page-首页 #ca-edit {display:none;}
.page-首页 #ca-ve-edit {display:none;}
.page-首页 #ca-history {display:none;}
.page-首页 #ca-talk {display:none;}
.page-首页 #ca-delete {display:none;}
.page-首页 #ca-move {display:none;}
.page-首页 #ca-protect {display:none;}
/* 将logo换成图片 */
.mw-logo-wordmark {
height: 55px;
font-size: 0 !important;
background:url('https://rizwiki.cn/images/9/96/Rizwiki_logo.png') left no-repeat;
background-size: contain;
}
/* Font */
@font-face {
font-family: '思源黑体';
src:
local('思源黑体'),
local('Source Han Sans CN'),
url('/skins/Citizen/SourceHanSansCN-VF.otf');
}
@font-face {
font-family: 'Comfortaa';
src:
local('Comfortaa'),
url('./skins/Citizen/Comfortaa[wght].ttf');
}
body {
font-family: 'Comfortaa', '思源黑体', var(--font-family-base), sans-serif;
}
/* fix */
.infobox {
padding-left: 15px;
}
@media (max-width: 510px) {
.infobox {
float: none;
margin-left: 0;
margin-bottom: 85px;
padding-left: 0px;
order: 0;
}
.citizen-section,
.mw-content-ltr {
display: flex;
flex-direction: column;
}
.citizen-section > p,
.mw-content-ltr > p {
width: 100%;
margin-top: 20px;
}
}
.home-card--button,
#home-nav .home-card {
position: relative;
overflow: hidden;
display: block;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-card__foreground {
height: 100%;
position: absolute;
left: 0px;
color: white;
line-height: 17px;
font-weight: 500;
user-select: none;
pointer-events: none;
z-index: 2;
padding: 16px;
text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.home-card__background {
position: relative;
width: 100%;
height: 100%;
}
.home-card__background img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
transform-origin: center;
will-change: transform;
backface-visibility: hidden;
}
.home-card__background::before {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
content: "";
background: linear-gradient(135deg,
rgba(0,0,0,1) 0%,
rgba(0,0,0,0.5) 50%,
transparent 100%);
pointer-events: none;
z-index: 1;
transition: opacity 0.3s;
}
.home-card--button:hover,
#home-nav .home-card:hover {
transform: translateY(-5px);
box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}
.home-card--button:hover .home-card__background img,
#home-nav .home-card:hover .home-card__background img {
transform: scale(1.07);
}
.home-card--button:hover .home-card__background::before,
#home-nav .home-card:hover .home-card__background::before {
opacity: 0.9;
}
.citizen-page-heading {
display: flex;
flex-direction: column;
gap: 0.1rem;
}
.firstHeading-container {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 0.1rem;
}
.title-shortlink-container {
width: 100%;
order: 1;
}
#siteSub {
order: 2;
}
table:has(math) {
display: block;
border: 0;
max-width: 100%;
overflow-x: auto;
}
/*
.navbox:not(.mw-collapsed) {
display: inline-block;
max-width: 100%;
overflow-x: auto;
white-space: nowrap;
}
*/
.navbox-inner:not(.mw-collapsed) {
display: inline-block;
white-space: nowrap;
}
.navbox-subgroup:not(.mw-collapsed) {
white-space: normal;
}
/* --- 绿豆诡计播放器 --- */
#riz-player {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 114514 !important;
background: var(--rp-c1);
color: #fff;
border-radius: 50px;
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
display: flex;
align-items: center;
padding: 5px;
transition: bottom 0.3s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s;
overflow: hidden;
font-family: "Comfortaa", sans-serif;
height: 70px;
width: 70px;
user-select: none;
box-sizing: border-box;
}
/* 展开状态 */
#riz-player.riz-player-expanded {
width: 360px;
border-radius: 35px;
padding-right: 20px;
}
/* 封面 */
.rp-cover {
width: 58px;
height: 58px;
border-radius: 50%;
overflow: hidden;
position: relative;
flex-shrink: 0;
cursor: pointer;
border: 4px solid var(--rp-c2);
box-sizing: border-box;
animation: rp-rotate 10s linear infinite;
animation-play-state: paused;
background: #fff;
z-index: 20;
display: flex;
align-items: center;
justify-content: center;
}
.rp-cover img,
.rp-cover-img {
width: 100% !important;
height: 100% !important;
object-fit: cover;
display: block;
border-radius: 50%;
margin: 0;
padding: 0;
}
@keyframes rp-rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
#riz-player.playing .rp-cover {
animation-play-state: running;
}
.rp-btn-toggle {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.4);
display: flex;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.2s;
z-index: 10;
}
.rp-cover:hover .rp-btn-toggle {
opacity: 1;
}
.rp-icon-play {
width: 0; height: 0;
border-style: solid;
border-width: 6px 0 6px 10px;
border-color: transparent transparent transparent #fff;
margin-left: 2px;
}
.rp-icon-pause {
width: 10px; height: 12px;
border-left: 3px solid #fff;
border-right: 3px solid #fff;
display: none;
}
#riz-player.playing .rp-icon-pause { display: block; }
#riz-player.playing .rp-icon-play { display: none; }
/* 信息区域 */
.rp-info {
margin-left: 12px;
flex-grow: 1;
opacity: 0;
transition: opacity 0.2s 0.1s;
display: flex;
flex-direction: column;
justify-content: space-evenly;
width: 0;
height: 100%;
overflow: hidden;
padding: 2px 0;
}
#riz-player.riz-player-expanded .rp-info {
opacity: 1;
width: 260px;
}
.rp-top-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2px;
position: relative;
z-index: 5;
}
.rp-text-info {
flex-grow: 1;
overflow: hidden;
margin-right: 10px;
display: flex;
flex-direction: column;
justify-content: center;
pointer-events: none;
}
.rp-title {
font-size: 15px;
font-weight: bold;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
line-height: 1.2;
}
.rp-artist {
font-size: 11px;
opacity: 0.85;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
line-height: 1.2;
}
.rp-side-ctrl {
width: 32px;
height: 32px;
flex-shrink: 0;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
background: rgba(255,255,255,0.2);
transition: background 0.2s;
pointer-events: auto;
z-index: 30;
}
.rp-side-ctrl:hover {
background: rgba(255,255,255,0.4);
}
.rp-side-play {
width: 12px;
height: 14px;
box-sizing: border-box;
border-style: solid;
border-width: 7px 0 7px 12px;
border-color: transparent transparent transparent #fff;
margin-left: 3px;
}
.rp-side-pause {
width: 12px;
height: 14px;
border-left: 4px solid #fff;
border-right: 4px solid #fff;
display: none;
}
#riz-player.playing .rp-side-play { display: none; }
#riz-player.playing .rp-side-pause { display: block; }
/* 进度条 */
.rp-progress-wrap {
height: 16px;
width: auto;
cursor: pointer;
display: flex;
align-items: center;
position: relative;
margin: 0 8px;
z-index: 100;
}
.rp-progress-bar {
width: 100%;
height: 4px;
background: rgba(255,255,255,0.3);
border-radius: 2px;
position: relative;
pointer-events: none;
}
.rp-progress-current {
width: 0%;
height: 100%;
background: var(--rp-c2);
border-radius: 2px;
position: absolute;
top: 0; left: 0;
}
.rp-progress-handle {
width: 12px; height: 12px;
background: #fff;
border-radius: 50%;
position: absolute;
top: -4px;
left: 0%;
margin-left: -6px;
transform: scale(0);
transition: transform 0.1s;
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.rp-progress-wrap:hover .rp-progress-handle,
.rp-progress-wrap.dragging .rp-progress-handle {
transform: scale(1);
}
.rp-time {
font-size: 9px;
text-align: left;
margin-top: 0px;
font-family: monospace;
opacity: 0.9;
padding-left: 8px;
line-height: 1;
pointer-events: none;
}
/* 手机端适配 */
@media (max-width: 768px) {
#riz-player {
bottom: 130px;
right: 15px;
}
#riz-player.rp-scroll-down {
bottom: 35px !important;
}
#riz-player.riz-player-expanded {
width: 300px;
max-width: calc(100vw - 30px);
}
#riz-player.riz-player-expanded .rp-info {
width: 200px;
}
.rp-title {
font-size: 13px;
}
.rp-artist {
font-size: 10px;
}
}
/*
* 为 SocialProfile 扩展补充 visualClear CSS 定义
* 解决在新版皮肤 (如 Vector-2022) 下个人主页布局错乱的问题
* 参考: https://phabricator.wikimedia.org/T328235
*/
.visualClear {
clear: both;
}
/* 移动端infobox不浮动,居中显示 */
@media (max-width: 768px) {
.infobox {
float: none !important;
clear: both !important;
margin: 0 auto 1em auto !important;
width: 100% !important;
max-width: 100% !important;
}
}