MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| (未显示同一用户的10个中间版本) | |||
| 第122行: | 第122行: | ||
滚动文字条 | 滚动文字条 | ||
参数: | 参数: | ||
--fx-scroll-speed | --fx-scroll-speed 单程周期,默认 10s | ||
--fx-scroll-length 端点长度(窗口宽度/高度) | |||
--fx-scroll-gap 份间间隔,默认 2em | |||
前提:内容宽度 ≥ 端点长度,否则必有空白 | |||
============================================ */ | ============================================ */ | ||
.fx-scroll { | .fx-scroll { | ||
overflow: hidden; | overflow: hidden; | ||
width: 100%; | display: inline-block; | ||
vertical-align: top; | |||
max-width: 100%; | |||
} | |||
.fx-scroll__inner { | |||
display: inline-flex; | |||
flex-wrap: nowrap; | |||
align-items: flex-start; | |||
} | |||
/* ---- 水平 ---- */ | |||
.fx-scroll--left, | |||
.fx-scroll--right { | |||
width: var(--fx-scroll-length, 100%); | |||
white-space: nowrap; | white-space: nowrap; | ||
} | } | ||
.fx-scroll__inner | .fx-scroll--left .fx-scroll__inner, | ||
.fx-scroll--right .fx-scroll__inner { | |||
white-space: nowrap; | white-space: nowrap; | ||
} | |||
.fx-scroll--left .fx-scroll__inner > span, | |||
.fx-scroll--right .fx-scroll__inner > span { | |||
flex-shrink: 0; | |||
padding-right: var(--fx-scroll-gap, 2em); | |||
} | } | ||
.fx-scroll--left .fx-scroll__inner { | |||
animation: fx-scroll-left var(--fx-scroll-speed, 10s) linear infinite; | |||
} | |||
@keyframes fx-scroll-left { | @keyframes fx-scroll-left { | ||
0% { transform: translateX( | 0% { transform: translateX(0); } | ||
100% { transform: translateX(- | 100% { transform: translateX(-50%); } | ||
} | |||
.fx-scroll--right .fx-scroll__inner { | |||
animation: fx-scroll-right var(--fx-scroll-speed, 10s) linear infinite; | |||
} | } | ||
@keyframes fx-scroll-right { | @keyframes fx-scroll-right { | ||
0% { transform: translateX(- | 0% { transform: translateX(-50%); } | ||
100% { transform: translateX(100%); } | 100% { transform: translateX(0); } | ||
} | |||
/* ---- 垂直 ---- */ | |||
.fx-scroll--up, | |||
.fx-scroll--down { | |||
height: var(--fx-scroll-length, 8em); | |||
width: 1.2em; | |||
white-space: normal; | |||
} | |||
.fx-scroll--up .fx-scroll__inner, | |||
.fx-scroll--down .fx-scroll__inner { | |||
display: block; | |||
width: 100%; | |||
text-align: center; | |||
} | |||
.fx-scroll--up .fx-scroll__inner > span, | |||
.fx-scroll--down .fx-scroll__inner > span { | |||
display: block; | |||
width: 100%; | |||
word-break: break-all; | |||
white-space: normal; | |||
padding-bottom: var(--fx-scroll-gap, 2em); | |||
} | |||
.fx-scroll--up .fx-scroll__inner { | |||
animation: fx-scroll-up var(--fx-scroll-speed, 10s) linear infinite; | |||
} | } | ||
@keyframes fx-scroll-up { | @keyframes fx-scroll-up { | ||
0% { transform: translateY( | 0% { transform: translateY(0); } | ||
100% { transform: translateY(- | 100% { transform: translateY(-50%); } | ||
} | |||
.fx-scroll--down .fx-scroll__inner { | |||
animation: fx-scroll-down var(--fx-scroll-speed, 10s) linear infinite; | |||
} | } | ||
@keyframes fx-scroll-down { | @keyframes fx-scroll-down { | ||
0% { transform: translateY(- | 0% { transform: translateY(-50%); } | ||
100% { transform: translateY( | 100% { transform: translateY(0); } | ||
} | } | ||
/* ============================================ | /* ============================================ | ||
MediaWiki默认功能禁用 | MediaWiki默认功能禁用 | ||
2026年10月5日 (一) 10:51的最新版本
/* ============================================
FX 效果类库
全站可调用:给任意元素加对应类名即可
============================================ */
/* ---- 边缘发光:静态 ---- */
.fx-glow {
box-shadow:
0 0 6px rgba(139, 26, 43, 0.7),
0 0 14px rgba(139, 26, 43, 0.5),
0 0 22px rgba(139, 26, 43, 0.3);
}
/* ---- 边缘发光:呼吸脉冲 ---- */
@keyframes fx-pulse-glow {
0%, 100% {
box-shadow:
0 0 6px rgba(139, 26, 43, 0.7),
0 0 14px rgba(139, 26, 43, 0.5),
0 0 22px rgba(139, 26, 43, 0.3);
}
50% {
box-shadow:
0 0 10px rgba(139, 26, 43, 1),
0 0 20px rgba(139, 26, 43, 0.7),
0 0 32px rgba(139, 26, 43, 0.5);
}
}
.fx-pulse {
animation: fx-pulse-glow 2s ease-in-out infinite;
}
/* ---- 图标切换:一显一隐 ---- */
.fx-swap {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
}
.fx-swap__a,
.fx-swap__b {
transition: opacity 0.3s ease, transform 0.3s ease;
line-height: 1;
}
.fx-swap__b {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0.85);
opacity: 0;
}
.fx-swap:hover .fx-swap__a,
.fx-swap.is-active .fx-swap__a {
opacity: 0;
transform: scale(0.85);
}
.fx-swap:hover .fx-swap__b,
.fx-swap.is-active .fx-swap__b {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
}
/* ============================================
文字边缘发光 + 呼吸显隐
参数(在元素上行内覆盖即可):
--fx-glow-color 发光颜色,默认 #8b1a2b
--fx-speed 呼吸 / 脉冲周期,默认 2s
============================================ */
/* ---- 文字边缘发光:静态 ---- */
.fx-text-glow {
text-shadow:
0 0 4px var(--fx-glow-color, #8b1a2b),
0 0 10px var(--fx-glow-color, #8b1a2b),
0 0 18px var(--fx-glow-color, #8b1a2b);
}
/* ---- 呼吸显隐(不发光) ---- */
@keyframes fx-breath {
0%, 38% { opacity: 1; }
50% { opacity: 0; }
62%, 100% { opacity: 1; }
}
.fx-text-breath {
animation: fx-breath var(--fx-speed, 2s) ease-in-out infinite;
}
/* ---- 呼吸显隐 + 边缘发光(合并,天然同步) ---- */
@keyframes fx-text-pulse {
0%, 38% {
opacity: 1;
text-shadow:
0 0 4px var(--fx-glow-color, #8b1a2b),
0 0 10px var(--fx-glow-color, #8b1a2b),
0 0 18px var(--fx-glow-color, #8b1a2b);
}
50% {
opacity: 0;
text-shadow: none;
}
62%, 100% {
opacity: 1;
text-shadow:
0 0 4px var(--fx-glow-color, #8b1a2b),
0 0 10px var(--fx-glow-color, #8b1a2b),
0 0 18px var(--fx-glow-color, #8b1a2b);
}
}
.fx-text-pulse {
animation: fx-text-pulse var(--fx-speed, 2s) ease-in-out infinite;
}
/* ---- 悬停轻微放大 ---- */
.fx-hover-grow {
transition: transform 0.2s;
}
.fx-hover-grow:hover {
transform: scale(1.08);
}
/* ============================================
滚动文字条
参数:
--fx-scroll-speed 单程周期,默认 10s
--fx-scroll-length 端点长度(窗口宽度/高度)
--fx-scroll-gap 份间间隔,默认 2em
前提:内容宽度 ≥ 端点长度,否则必有空白
============================================ */
.fx-scroll {
overflow: hidden;
display: inline-block;
vertical-align: top;
max-width: 100%;
}
.fx-scroll__inner {
display: inline-flex;
flex-wrap: nowrap;
align-items: flex-start;
}
/* ---- 水平 ---- */
.fx-scroll--left,
.fx-scroll--right {
width: var(--fx-scroll-length, 100%);
white-space: nowrap;
}
.fx-scroll--left .fx-scroll__inner,
.fx-scroll--right .fx-scroll__inner {
white-space: nowrap;
}
.fx-scroll--left .fx-scroll__inner > span,
.fx-scroll--right .fx-scroll__inner > span {
flex-shrink: 0;
padding-right: var(--fx-scroll-gap, 2em);
}
.fx-scroll--left .fx-scroll__inner {
animation: fx-scroll-left var(--fx-scroll-speed, 10s) linear infinite;
}
@keyframes fx-scroll-left {
0% { transform: translateX(0); }
100% { transform: translateX(-50%); }
}
.fx-scroll--right .fx-scroll__inner {
animation: fx-scroll-right var(--fx-scroll-speed, 10s) linear infinite;
}
@keyframes fx-scroll-right {
0% { transform: translateX(-50%); }
100% { transform: translateX(0); }
}
/* ---- 垂直 ---- */
.fx-scroll--up,
.fx-scroll--down {
height: var(--fx-scroll-length, 8em);
width: 1.2em;
white-space: normal;
}
.fx-scroll--up .fx-scroll__inner,
.fx-scroll--down .fx-scroll__inner {
display: block;
width: 100%;
text-align: center;
}
.fx-scroll--up .fx-scroll__inner > span,
.fx-scroll--down .fx-scroll__inner > span {
display: block;
width: 100%;
word-break: break-all;
white-space: normal;
padding-bottom: var(--fx-scroll-gap, 2em);
}
.fx-scroll--up .fx-scroll__inner {
animation: fx-scroll-up var(--fx-scroll-speed, 10s) linear infinite;
}
@keyframes fx-scroll-up {
0% { transform: translateY(0); }
100% { transform: translateY(-50%); }
}
.fx-scroll--down .fx-scroll__inner {
animation: fx-scroll-down var(--fx-scroll-speed, 10s) linear infinite;
}
@keyframes fx-scroll-down {
0% { transform: translateY(-50%); }
100% { transform: translateY(0); }
}
/* ============================================
MediaWiki默认功能禁用
============================================ */
/* ---- 禁用分类页面自动列出子项 ---- */
.ns-14 #mw-pages {
display: none;
}
/* ============================================
附加工具栏配置
============================================ */
/* ===== 工具栏面板里的功能按钮 ===== */
.rail-action-button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.6rem 1.2rem;
background: #56000d;
color: #fff;
border: none;
border-radius: 0.5rem;
font-size: 0.95rem;
font-family: inherit;
cursor: pointer;
transition: background 0.2s, transform 0.15s;
}
.rail-action-button:hover {
background: #8b1a2b;
}
.rail-action-button:active {
transform: scale(0.97);
}
/* ===== 工具栏设置账户区 ===== */
.rail-account-loading {
color: #888;
font-size: 0.9rem;
}
.rail-account-name {
font-size: 1.1rem;
font-weight: bold;
color: #56000d;
margin-bottom: 0.5rem;
}
.rail-account-groups {
font-size: 0.9rem;
color: #555;
margin-bottom: 0.75rem;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.3rem;
}
.rail-group-tag {
display: inline-block;
padding: 0.15rem 0.5rem;
background: rgba(86, 0, 13, 0.1);
color: #56000d;
border-radius: 0.25rem;
text-decoration: none;
font-size: 0.85rem;
transition: background 0.15s;
}
a.rail-group-tag:hover {
background: rgba(86, 0, 13, 0.22);
}
.rail-account-stats {
display: flex;
gap: 1rem;
font-size: 0.85rem;
color: #666;
margin-bottom: 0.75rem;
}
.rail-account-actions {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin-bottom: 0.5rem;
}
.rail-account-logout {
margin-top: 2rem;
}
.rail-action-button--danger {
background: #6b1010;
}
.rail-action-button--danger:hover {
background: #8b1a2b;
}
.rail-account-guest {
color: #666;
font-size: 0.9rem;
margin: 0 0 0.75rem 0;
}
/* ===== 工具栏账户按钮:强制白字 ===== */
.rail-panel a.rail-action-button,
.rail-panel a.rail-action-button:link,
.rail-panel a.rail-action-button:visited,
.rail-panel a.rail-action-button:hover,
.rail-panel a.rail-action-button:active {
color: #fff !important;
text-decoration: none !important;
}
/* ===== 账户标题 ===== */
.rail-account-title {
font-size: 1rem;
font-weight: bold;
color: #56000d;
border-left: 3px solid #56000d;
padding-left: 0.5rem;
margin: 1rem 0 0.5rem 0;
}
.rail-account-title:first-child {
margin-top: 0;
}
/* ===== 工具栏按钮:所有状态强制统一 ===== */
.rail-panel a.rail-action-button,
.rail-panel a.rail-action-button:link,
.rail-panel a.rail-action-button:visited {
background: #56000d !important;
color: #fff !important;
filter: none !important;
opacity: 1 !important;
text-decoration: none !important;
border: none !important;
}
.rail-panel a.rail-action-button:hover,
.rail-panel a.rail-action-button:focus,
.rail-panel a.rail-action-button:active {
background: #8b1a2b !important;
color: #fff !important;
filter: none !important;
opacity: 1 !important;
text-decoration: none !important;
}
.rail-panel a.rail-action-button--danger {
background: #6b1010 !important;
}
.rail-panel a.rail-action-button--danger:hover,
.rail-panel a.rail-action-button--danger:focus {
background: #8b1a2b !important;
}