MediaWiki:Common.css:修订间差异
来自Age Of History 2 Chinese Wiki
标签:回退 |
无编辑摘要 |
||
第1行: | 第1行: | ||
/* | /* MediaWiki扫描线效果主题CSS - 基于Backrooms数据库风格 */ | ||
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100;300;400;500;700;900&display=swap"); | |||
@import url("https://fonts.googleapis.com/css2?family=VT323&display=swap"); | |||
@import url("https://fastly.jsdelivr.net/gh/hoah2333/Fonts@main/Typeface-VonwaonBitmap-16px.css"); | |||
/* ==== 基础变量 ==== */ | |||
:root { | :root { | ||
/* ==== 字体设置 ==== */ | |||
--body-font: "VonwaonBitmap 16px", "Noto Sans SC", "Microsoft YaHei", "微软雅黑", VT323, monospace; | |||
--UI-font: "VonwaonBitmap 16px", "Noto Sans SC", "方体", "PingFang SC", VT323, monospace; | |||
--title-font: "VonwaonBitmap 16px", "Noto Sans SC", VT323, monospace; | |||
--mono-font: "VonwaonBitmap 16px", VT323, monospace; | |||
--base-font-size: 1.2rem; | |||
/* ==== 颜色方案 - 保留原MediaWiki颜色 ==== */ | |||
--link-color: #0645ad; | |||
--link-color-active: #faa700; | |||
--custom-background-blue: #ccf; | |||
--custom-background-cyan: #cef; | |||
--custom-background-green: #cfc; | |||
--custom-background-gray: #d2d2d2; | |||
--custom-background-grey: var(--custom-background-gray); | |||
--custom-background-magenta: #fdf; | |||
--custom-background-orange: #fdb; | |||
--custom-background-purple: #ecf; | |||
--custom-background-red: #fcc; | |||
--custom-background-yellow: #ffc; | |||
--custom-border-blue: #36e; | |||
--custom-border-cyan: #9df; | |||
--custom-border-green: #5d5; | |||
--custom-border-gray: #bbb; | |||
--custom-border-grey: var(--custom-border-gray); | |||
--custom-border-magenta: #f9f; | |||
--custom-border-orange: #f90; | |||
--custom-border-purple: #96c; | |||
--custom-border-red: #e44; | |||
--custom-border-yellow: #fc3; | |||
/* ==== Backrooms主题色彩 ==== */ | |||
--white-monochrome: 252, 252, 252; | |||
--black-monochrome: 10, 10, 10; | |||
--bright-accent: 229, 140, 36; | |||
--medium-accent: 229, 140, 36; | |||
--dark-accent: 140, 136, 126; | |||
--pale-accent: 140, 136, 126; | |||
--text-shadow: 2px 2px #C9781E; | |||
--custom-text: 175, 100, 30; | |||
/* ==== 扫描线效果设置 ==== */ | |||
--scanline-color: rgba(229, 140, 36, 0.05); | |||
--scanline-size: 2px; | |||
--scanline-timing: 6s; | |||
--fade-in-delay: 0.1s; | |||
} | } | ||
/* ==== 全局扫描线效果 ==== */ | |||
body::before { | |||
content: ""; | |||
position: fixed; | |||
width: 100vw; | |||
height: 100vh; | |||
pointer-events: none; | |||
background: repeating-linear-gradient( | |||
180deg, | |||
rgba(0,0,0,0), | |||
rgba(0,0,0,0) calc(var(--scanline-size) - 1px), | |||
var(--scanline-color) var(--scanline-size) | |||
); | |||
background-size: auto 8px; | |||
. | opacity: 0.7; | ||
z-index: 9999; | |||
} | } | ||
/* 扫描线动态效果 */ | |||
body::after { | |||
content: ""; | |||
position: fixed; | |||
width: 100vw; | |||
. | height: 1rem; | ||
top: 0; | |||
left: 0; | |||
pointer-events: none; | |||
background: linear-gradient( | |||
to bottom, | |||
rgba(229, 140, 36, 0.1) 0%, | |||
rgba(229, 140, 36, 0.1) 50%, | |||
rgba(229, 140, 36, 0.08) 51%, | |||
rgba(229, 140, 36, 0.1) 100% | |||
); | |||
opacity: 0.1; | |||
z-index: 9998; | |||
animation: scanline-move var(--scanline-timing) linear infinite; | |||
} | } | ||
@keyframes scanline-move { | |||
. | 0% { top: -1rem; opacity: 0.05; } | ||
25% { top: 50%; opacity: 0.03; } | |||
37.5%{ top: 75%; opacity: 0.06; } | |||
50% { top: 100%; opacity: 0.03; } | |||
100% { top: 100%; } | |||
} | } | ||
. | /* CRT屏幕模拟效果 */ | ||
#content::before { | |||
content: ""; | |||
position: fixed; | |||
width: 100vw; | |||
height: 100vh; | |||
pointer-events: none; | |||
background-image: radial-gradient( | |||
circle, | |||
rgba(229, 140, 36, 0.04) 4%, | |||
rgba(0, 0, 0, 0) 45%, | |||
rgba(229, 140, 36, 0.03) 95% | |||
); | |||
opacity: 0.25; | |||
mix-blend-mode: color-dodge; | |||
background-repeat: no-repeat; | |||
background-size: cover; | |||
z-index: 2; | |||
} | } | ||
/* ==== 全局基础设置 ==== */ | |||
html, body { | |||
margin: 0; | |||
padding: 0; | |||
font-family: var(--body-font); | |||
font-size: var(--base-font-size); | |||
line-height: 1.6; | |||
background-color: #fcfcfc; | |||
background-image: radial-gradient( | |||
circle, | |||
rgba(var(--medium-accent), 0.03) 50%, | |||
transparent 0 | |||
); | |||
background-size: 0.25em 0.25em; | |||
background-repeat: repeat; | |||
background-attachment: fixed; | |||
color: #000; | |||
} | } | ||
/* | /* 淡入动画效果 */ | ||
@media screen and (prefers-reduced-motion: no-preference) { | |||
#content > *, #mw-content-text > * { | |||
animation-name: fadeIn; | |||
animation-duration: 1s; | |||
animation-iteration-count: 1; | |||
animation-timing-function: ease-out; | |||
animation-fill-mode: backwards; | |||
} | |||
} | } | ||
@keyframes fadeIn { | |||
from { | |||
opacity: 0; | |||
transform: translate(0, 30px); | |||
} | |||
to { | |||
opacity: 1; | |||
transform: translate(0, 0); | |||
} | |||
} | } | ||
/* 内容逐项淡入 */ | |||
#mw-content-text > :nth-child(1) { animation-delay: calc(1 * var(--fade-in-delay)); } | |||
#mw-content-text > :nth-child(2) { animation-delay: calc(2 * var(--fade-in-delay)); } | |||
} | #mw-content-text > :nth-child(3) { animation-delay: calc(3 * var(--fade-in-delay)); } | ||
#mw-content-text > :nth-child(4) { animation-delay: calc(4 * var(--fade-in-delay)); } | |||
#mw-content-text > :nth-child(5) { animation-delay: calc(5 * var(--fade-in-delay)); } | |||
#mw-content-text > :nth-child(6) { animation-delay: calc(6 * var(--fade-in-delay)); } | |||
#mw-content-text > :nth-child(7) { animation-delay: calc(7 * var(--fade-in-delay)); } | |||
#mw-content-text > :nth-child(8) { animation-delay: calc(8 * var(--fade-in-delay)); } | |||
#mw-content-text > :nth-child(9) { animation-delay: calc(9 * var(--fade-in-delay)); } | |||
#mw-content-text > :nth-child(10) { animation-delay: calc(10 * var(--fade-in-delay)); } | |||
#mw-content-text > :nth-child(n+11) { animation-delay: calc(11 * var(--fade-in-delay)); } | |||
/* ==== 链接样式 ==== */ | |||
a { | |||
color: var(--link-color); | |||
text-decoration: none; | |||
transition: color 0.2s ease-in-out; | |||
} | } | ||
a:hover, a:focus { | |||
color: var(--link-color-active); | |||
text-decoration: underline; | |||
} | } | ||
a:hover::before { | |||
content: "> "; | |||
} | } | ||
a:visited { | |||
color: #0b0080; | |||
} | } | ||
. | a.new { | ||
color: #ba0000; | |||
} | } | ||
. | a.new:visited { | ||
color: #a55858; | |||
} | } | ||
. | /* ==== 标题样式 ==== */ | ||
h1, h2, h3, h4, h5, h6 { | |||
font-family: var(--title-font); | |||
font-weight: 700; | |||
line-height: 1.3; | |||
margin: 1em 0 0.5em; | |||
color: rgb(var(--custom-text)); | |||
text-shadow: 0.5px 0.5px rgba(var(--bright-accent), 0.5); | |||
} | } | ||
h1 { font-size: 1.8rem; border-bottom: 1px solid rgba(var(--swatch-primary), 0.2); } | |||
h2 { font-size: 1.6rem; border-bottom: 1px solid rgba(var(--custom-border-gray), 0.5); } | |||
h3 { font-size: 1.4rem; } | |||
. | h4 { font-size: 1.2rem; } | ||
h5 { font-size: 1.1rem; } | |||
} | h6 { font-size: 1rem; } | ||
/* ==== 强化infobox样式 ==== */ | |||
.notaninfobox { | |||
position: relative; | |||
clear: right; | |||
margin: 0 0 1em 1em; | |||
width: 350px; | |||
font-size: 90%; | |||
background-color: var(--custom-table-background); | |||
/* | |||
clear: | |||
margin: | |||
font- | |||
float: right; | float: right; | ||
border: 1px solid var(--custom-border-gray); | |||
padding: 2px; | |||
overflow: auto; | |||
z-index: 1; | |||
overflow-wrap: anywhere; | |||
box-shadow: 0 2px 5px rgba(0,0,0,0.1); | |||
transition: box-shadow 0.3s ease; | |||
} | } | ||
.notaninfobox:hover { | |||
box-shadow: 0 4px 10px rgba(0,0,0,0.15); | |||
} | } | ||
.notaninfobox > .infobox-title { | |||
font-weight: bold; | |||
font- | text-align: center; | ||
font-size: 120%; | |||
background-color: #BCD4F5; | |||
padding: 6px; | |||
} | } | ||
/* | /* ==== 黑幕效果 ==== */ | ||
.heimu, | |||
.heimu rt { | |||
.heimu, | --heimu-color: #252525; | ||
.heimu rt{ | --heimu-text-color: #fff; | ||
--heimu-color:#252525; | background-color: var(--heimu-color); | ||
--heimu-text-color:#fff; | transition: color 0.2s ease-in-out; | ||
} | } | ||
第347行: | 第264行: | ||
a .heimu, | a .heimu, | ||
a.new .heimu, | a.new .heimu, | ||
span.heimu a:visited | span.heimu a:visited { | ||
color: var(--heimu-color); | |||
text-shadow: none; | |||
color:var(--heimu-color); | |||
text-shadow:none; | |||
} | } | ||
span.heimu:hover, | span.heimu:hover, | ||
span.heimu:active{ | span.heimu:active { | ||
color:var(--heimu-text-color); | color: var(--heimu-text-color); | ||
} | } | ||
/* ==== 彩幕效果 ==== */ | |||
.colormu-drk { | |||
color: | color: #FFF; | ||
} | } | ||
.colormu-bri { | |||
color: #000; | |||
color: | |||
} | } | ||
.colormu-drk:not(.colormu_toggle_on) a { | |||
color: #add8e6; | |||
a | |||
color: | |||
} | } | ||
.colormu-drk:not(.colormu_toggle_on) a.new { | |||
color: #FCC; | |||
a.new | |||
color: | |||
} | } | ||
.colormu>span, .colormu a, .colormu a>span { | |||
span. | transition: color 0.2s; | ||
a | |||
} | } | ||
.colormu:not(:hover):not(:active):not(.colormu_toggle_on)>span, | |||
.colormu:not(:hover):not(:active):not(.colormu_toggle_on) a { | |||
color: transparent; | |||
. | |||
.hover | |||
} | } | ||
.hover | .colormu:not(:hover):not(:active):not(.colormu_toggle_on) a>span { | ||
. | color: transparent !important; | ||
} | } | ||
/* ==== 特殊区块样式 ==== */ | |||
/* 引用块 */ | |||
blockquote { | |||
margin: 1em 0; | |||
padding: 0.5em 1em; | |||
border-left: 3px solid rgba(var(--bright-accent), 0.7); | |||
background-color: rgba(var(--white-monochrome), 0.5); | |||
box-shadow: 0.05rem 0.1rem 0.3rem rgba(0,0,0,.25); | |||
} | } | ||
. | /* 亮色样式引用 */ | ||
.lightstyled-quote { | |||
. | background-color: rgb(var(--bright-accent)); | ||
. | color: rgb(0, 0, 0); | ||
border-left: 0.5rem solid rgba(var(--dark-gray-monochrome)); | |||
padding: 0.1rem 1rem; | |||
margin: 0.5rem 0 0.5rem 0.25rem; | |||
box-shadow: 0.05rem 0.1rem 0.3rem rgba(0,0,0,.25); | |||
} | } | ||
. | /* 暗色样式引用 */ | ||
. | .darkstyled-quote { | ||
background-color: rgb(var(--dark-gray-monochrome)); | |||
. | border-left: 0.5rem solid rgba(var(--bright-accent)); | ||
color: rgb(var(--white-monochrome)); | |||
padding: 0.1rem 1rem; | |||
margin: 0.5rem 0 0.5rem 0.25rem; | |||
box-shadow: 0.05rem 0.1rem 0.3rem rgba(0,0,0,.25); | |||
} | } | ||
. | .darkstyled-quote a { | ||
color: rgb(var(--swatch-menubg-medium-color)); | |||
} | } | ||
/* | /* 亮色块 */ | ||
. | .lightblock { | ||
background-color: rgb(var(--bright-accent)); | |||
color: rgb(0, 0, 0); | |||
padding: 0.01rem 1rem; | |||
. | margin: 0.5rem 0 0.5rem 0.25rem; | ||
box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); | |||
} | } | ||
/* | /* 暗色块 */ | ||
. | .darkblock { | ||
background-color: rgb(var(--dark-gray-monochrome)); | |||
color: rgb(var(--white-monochrome)); | |||
padding: 0.01rem 1rem; | |||
margin: 0.5rem 0 0.5rem 0.25rem; | |||
box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); | |||
} | } | ||
. | /* 带边框的暗色块 */ | ||
.dark-borderblock { | |||
. | background-color: rgb(var(--dark-gray-monochrome)); | ||
. | color: rgb(var(--white-monochrome)); | ||
padding: 0.01rem 1rem; | |||
margin: 0.5rem 0 0.5rem 0.25rem; | |||
box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); | |||
border: solid 0.3rem rgb(var(--bright-accent)); | |||
} | } | ||
. | /* 带边框的亮色块 */ | ||
. | .light-borderblock { | ||
background-color: rgb(var(--bright-accent)); | |||
. | color: rgb(0, 0, 0); | ||
padding: 0.01rem 1rem; | |||
margin: 0.5rem 0 0.5rem 0.25rem; | |||
box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); | |||
border: solid 0.3rem rgb(var(--dark-gray-monochrome)); | |||
} | } | ||
/* | /* 带Logo的边框块 */ | ||
.border-logoblock { | |||
padding: 0.01rem 1rem; | |||
box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); | |||
color: rgb(var(--white-monochrome)); | |||
margin: 0.5rem 0 0.5rem 0.25rem; | |||
display: block; | |||
position: relative; | |||
background-color: rgb(var(--dark-gray-monochrome)); | |||
border: solid 0.3rem rgb(var(--bright-accent)); | |||
} | } | ||
/* | /* Logo块 */ | ||
. | .logoblock { | ||
padding: 0.01rem 1rem; | |||
color: rgb(var(--white-monochrome)); | |||
box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); | |||
margin: 0.5rem 0 0.5rem 0.25rem; | |||
display: block; | |||
position: relative; | |||
background-color: rgb(var(--dark-gray-monochrome)); | |||
} | } | ||
. | /* 带标题的块 */ | ||
.titleblock { | |||
background-color: rgb(var(--dark-gray-monochrome)); | |||
color: rgb(var(--white-monochrome)); | |||
padding: 0.5rem 1rem 0.10rem; | |||
margin: 1.5rem 0rem 0.5rem 0rem; | |||
box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.5); | |||
border: solid rgb(var(--bright-accent)) 2px; | |||
} | } | ||
. | .titlebox { | ||
color: rgb(var(--dark-gray-monochrome)); | |||
position: relative; | |||
top: -1.6rem; | |||
background-color: rgb(var(--bright-accent)); | |||
padding: 0.25rem 1rem; | |||
line-height: 0.1rem; | |||
} | } | ||
/* | /* ==== 表格样式 ==== */ | ||
table { | |||
border-collapse: collapse; | |||
border-spacing: 0; | |||
margin: 1em 0; | |||
} | } | ||
table th { | |||
background-color: rgba(var(--bright-accent), 0.2); | |||
font-weight: bold; | |||
text-align: center; | |||
padding: 6px; | |||
border: 1px solid var(--custom-border-gray); | |||
} | } | ||
table td { | |||
padding: 4px 6px; | |||
border: 1px solid var(--custom-border-gray); | |||
} | } | ||
table tr:nth-child(odd) { | |||
background-color: rgba(var(--white-monochrome), 0.8); | |||
} | } | ||
table tr:nth-child(even) { | |||
background-color: rgba(var(--white-monochrome), 0.6); | |||
} | } | ||
/* ==== 列表样式 ==== */ | |||
ul, ol { | |||
padding-left: 2em; | |||
margin: 1em 0; | |||
} | } | ||
li { | |||
margin: 0.3em 0; | |||
} | } | ||
/* ==== 代码和预格式化文本 ==== */ | |||
pre, code, tt, kbd, samp { | |||
font-family: var(--mono-font); | |||
background-color: var(--custom-code-background, #f8f9fa); | |||
padding: 1px 3px; | |||
border-radius: 2px; | |||
} | } | ||
pre { | |||
padding: 8px; | |||
overflow-x: auto; | |||
line-height: 1.4; | |||
border: 1px solid rgba(var(--black-monochrome), 0.1); | |||
} | } | ||
/* ==== 表单元素 ==== */ | |||
input, button, select, textarea { | |||
font-family: var(--UI-font); | |||
font-size: 0.9rem; | |||
padding: 4px 8px; | |||
border: 1px solid var(--custom-border-gray); | |||
border-radius: 3px; | |||
} | } | ||
button, input[type="button"], input[type="submit"] { | |||
background-color: rgba(var(--bright-accent), 0.1); | |||
cursor: pointer; | |||
transition: background-color 0.2s; | |||
} | } | ||
button:hover, input[type="button"]:hover, input[type="submit"]:hover { | |||
background-color: rgba(var(--bright-accent), 0.2); | |||
} | } | ||
/* | /* ==== 选中文本样式 ==== */ | ||
::selection { | |||
background: rgba(var(--bright-accent), 0.25); | |||
text-shadow: none; | |||
} | } | ||
/* ==== 滚动条样式 ==== */ | |||
::-webkit-scrollbar { | |||
width: 10px; | |||
height: 10px; | |||
} | } | ||
::-webkit-scrollbar-track { | |||
background: #f1f1f1; | |||
} | } | ||
::-webkit-scrollbar-thumb { | |||
background: rgba(var(--bright-accent), 0.5); | |||
border-radius: 5px; | |||
} | } | ||
::-webkit-scrollbar-thumb:hover { | |||
background: rgba(var(--bright-accent), 0.7); | |||
} | } | ||
. | /* ==== 导航框样式 ==== */ | ||
table.navbox { | |||
border: 1px solid #aaa; | |||
clear: both; | |||
margin: auto; | |||
padding: 1px; | |||
text-align: center; | |||
width: 100%; | |||
background: var(--theme-card-background-color, #fdfdfd); | |||
} | } | ||
table.navbox + table.navbox { | |||
margin-top: -1px; | |||
} | } | ||
. | .navbox-title, | ||
. | .navbox-abovebelow, | ||
table.navbox th { | |||
padding-left: 1em; | |||
padding-right: 1em; | |||
text-align: center; | |||
background: none repeat scroll 0 0 rgba(var(--bright-accent), 0.2); | |||
} | } | ||
.navbox-group { | |||
font-weight: 700; | |||
white-space: nowrap; | |||
} | } | ||
/* ==== 响应式设计 ==== */ | |||
. | @media all and (max-width: 511px) { | ||
.notaninfobox { | |||
float: none; | |||
margin-left: 0; | |||
width: auto; | |||
} | |||
/* 在小屏幕上减弱扫描线效果 */ | |||
:root { | |||
--scanline-color: rgba(229, 140, 36, 0.03); | |||
--scanline-size: 3px; | |||
} | |||
} | } | ||
@media only screen and (max-width: 759px) { | |||
.infotable { | |||
. | width: 90%; | ||
float: none; | |||
margin: 0 auto; | |||
} | |||
.navbox-title > div { | |||
display: none; | |||
} | |||
.navbox-group, | |||
.navbox-group > div { | |||
padding-left: 0 !important; | |||
padding-right: 0 !important; | |||
text-align: center; | |||
} | |||
} | } | ||
/* | /* ==== 打印样式 ==== */ | ||
@media print { | |||
body::before, body::after, #content::before { | |||
display: none; | |||
} | |||
} | } | ||
/* | /* ==== 工具辅助类 ==== */ | ||
/* 旋转特效 */ | |||
.hovers- | .hovers-rotate { | ||
transition-duration: 0.5s; | |||
transform: rotate(0); | |||
} | } | ||
.hovers-rotate:hover { | |||
.hovers | transition-duration: 0.5s; | ||
transform: rotate(360deg); | |||
transform: | |||
} | } | ||
/* 缩放特效 */ | |||
.hovers-grow { | |||
transform: scale(1); | |||
transition: transform 0.3s ease; | |||
. | |||
} | } | ||
.hovers- | .hovers-grow:hover { | ||
transform: scale(1.25); | |||
} | } | ||
/* 模块框 */ | |||
.modulebox { | |||
border: 1px solid #ccc; | |||
padding: 10px; | |||
margin: 10px 0; | |||
background-color: #f9f9f9; | |||
/* | |||
. | |||
} | } | ||
2025年4月12日 (六) 19:22的版本
/* MediaWiki扫描线效果主题CSS - 基于Backrooms数据库风格 */ @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100;300;400;500;700;900&display=swap"); @import url("https://fonts.googleapis.com/css2?family=VT323&display=swap"); @import url("https://fastly.jsdelivr.net/gh/hoah2333/Fonts@main/Typeface-VonwaonBitmap-16px.css"); /* ==== 基础变量 ==== */ :root { /* ==== 字体设置 ==== */ --body-font: "VonwaonBitmap 16px", "Noto Sans SC", "Microsoft YaHei", "微软雅黑", VT323, monospace; --UI-font: "VonwaonBitmap 16px", "Noto Sans SC", "方体", "PingFang SC", VT323, monospace; --title-font: "VonwaonBitmap 16px", "Noto Sans SC", VT323, monospace; --mono-font: "VonwaonBitmap 16px", VT323, monospace; --base-font-size: 1.2rem; /* ==== 颜色方案 - 保留原MediaWiki颜色 ==== */ --link-color: #0645ad; --link-color-active: #faa700; --custom-background-blue: #ccf; --custom-background-cyan: #cef; --custom-background-green: #cfc; --custom-background-gray: #d2d2d2; --custom-background-grey: var(--custom-background-gray); --custom-background-magenta: #fdf; --custom-background-orange: #fdb; --custom-background-purple: #ecf; --custom-background-red: #fcc; --custom-background-yellow: #ffc; --custom-border-blue: #36e; --custom-border-cyan: #9df; --custom-border-green: #5d5; --custom-border-gray: #bbb; --custom-border-grey: var(--custom-border-gray); --custom-border-magenta: #f9f; --custom-border-orange: #f90; --custom-border-purple: #96c; --custom-border-red: #e44; --custom-border-yellow: #fc3; /* ==== Backrooms主题色彩 ==== */ --white-monochrome: 252, 252, 252; --black-monochrome: 10, 10, 10; --bright-accent: 229, 140, 36; --medium-accent: 229, 140, 36; --dark-accent: 140, 136, 126; --pale-accent: 140, 136, 126; --text-shadow: 2px 2px #C9781E; --custom-text: 175, 100, 30; /* ==== 扫描线效果设置 ==== */ --scanline-color: rgba(229, 140, 36, 0.05); --scanline-size: 2px; --scanline-timing: 6s; --fade-in-delay: 0.1s; } /* ==== 全局扫描线效果 ==== */ body::before { content: ""; position: fixed; width: 100vw; height: 100vh; pointer-events: none; background: repeating-linear-gradient( 180deg, rgba(0,0,0,0), rgba(0,0,0,0) calc(var(--scanline-size) - 1px), var(--scanline-color) var(--scanline-size) ); background-size: auto 8px; opacity: 0.7; z-index: 9999; } /* 扫描线动态效果 */ body::after { content: ""; position: fixed; width: 100vw; height: 1rem; top: 0; left: 0; pointer-events: none; background: linear-gradient( to bottom, rgba(229, 140, 36, 0.1) 0%, rgba(229, 140, 36, 0.1) 50%, rgba(229, 140, 36, 0.08) 51%, rgba(229, 140, 36, 0.1) 100% ); opacity: 0.1; z-index: 9998; animation: scanline-move var(--scanline-timing) linear infinite; } @keyframes scanline-move { 0% { top: -1rem; opacity: 0.05; } 25% { top: 50%; opacity: 0.03; } 37.5%{ top: 75%; opacity: 0.06; } 50% { top: 100%; opacity: 0.03; } 100% { top: 100%; } } /* CRT屏幕模拟效果 */ #content::before { content: ""; position: fixed; width: 100vw; height: 100vh; pointer-events: none; background-image: radial-gradient( circle, rgba(229, 140, 36, 0.04) 4%, rgba(0, 0, 0, 0) 45%, rgba(229, 140, 36, 0.03) 95% ); opacity: 0.25; mix-blend-mode: color-dodge; background-repeat: no-repeat; background-size: cover; z-index: 2; } /* ==== 全局基础设置 ==== */ html, body { margin: 0; padding: 0; font-family: var(--body-font); font-size: var(--base-font-size); line-height: 1.6; background-color: #fcfcfc; background-image: radial-gradient( circle, rgba(var(--medium-accent), 0.03) 50%, transparent 0 ); background-size: 0.25em 0.25em; background-repeat: repeat; background-attachment: fixed; color: #000; } /* 淡入动画效果 */ @media screen and (prefers-reduced-motion: no-preference) { #content > *, #mw-content-text > * { animation-name: fadeIn; animation-duration: 1s; animation-iteration-count: 1; animation-timing-function: ease-out; animation-fill-mode: backwards; } } @keyframes fadeIn { from { opacity: 0; transform: translate(0, 30px); } to { opacity: 1; transform: translate(0, 0); } } /* 内容逐项淡入 */ #mw-content-text > :nth-child(1) { animation-delay: calc(1 * var(--fade-in-delay)); } #mw-content-text > :nth-child(2) { animation-delay: calc(2 * var(--fade-in-delay)); } #mw-content-text > :nth-child(3) { animation-delay: calc(3 * var(--fade-in-delay)); } #mw-content-text > :nth-child(4) { animation-delay: calc(4 * var(--fade-in-delay)); } #mw-content-text > :nth-child(5) { animation-delay: calc(5 * var(--fade-in-delay)); } #mw-content-text > :nth-child(6) { animation-delay: calc(6 * var(--fade-in-delay)); } #mw-content-text > :nth-child(7) { animation-delay: calc(7 * var(--fade-in-delay)); } #mw-content-text > :nth-child(8) { animation-delay: calc(8 * var(--fade-in-delay)); } #mw-content-text > :nth-child(9) { animation-delay: calc(9 * var(--fade-in-delay)); } #mw-content-text > :nth-child(10) { animation-delay: calc(10 * var(--fade-in-delay)); } #mw-content-text > :nth-child(n+11) { animation-delay: calc(11 * var(--fade-in-delay)); } /* ==== 链接样式 ==== */ a { color: var(--link-color); text-decoration: none; transition: color 0.2s ease-in-out; } a:hover, a:focus { color: var(--link-color-active); text-decoration: underline; } a:hover::before { content: "> "; } a:visited { color: #0b0080; } a.new { color: #ba0000; } a.new:visited { color: #a55858; } /* ==== 标题样式 ==== */ h1, h2, h3, h4, h5, h6 { font-family: var(--title-font); font-weight: 700; line-height: 1.3; margin: 1em 0 0.5em; color: rgb(var(--custom-text)); text-shadow: 0.5px 0.5px rgba(var(--bright-accent), 0.5); } h1 { font-size: 1.8rem; border-bottom: 1px solid rgba(var(--swatch-primary), 0.2); } h2 { font-size: 1.6rem; border-bottom: 1px solid rgba(var(--custom-border-gray), 0.5); } h3 { font-size: 1.4rem; } h4 { font-size: 1.2rem; } h5 { font-size: 1.1rem; } h6 { font-size: 1rem; } /* ==== 强化infobox样式 ==== */ .notaninfobox { position: relative; clear: right; margin: 0 0 1em 1em; width: 350px; font-size: 90%; background-color: var(--custom-table-background); float: right; border: 1px solid var(--custom-border-gray); padding: 2px; overflow: auto; z-index: 1; overflow-wrap: anywhere; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: box-shadow 0.3s ease; } .notaninfobox:hover { box-shadow: 0 4px 10px rgba(0,0,0,0.15); } .notaninfobox > .infobox-title { font-weight: bold; text-align: center; font-size: 120%; background-color: #BCD4F5; padding: 6px; } /* ==== 黑幕效果 ==== */ .heimu, .heimu rt { --heimu-color: #252525; --heimu-text-color: #fff; background-color: var(--heimu-color); transition: color 0.2s ease-in-out; } .heimu, .heimu a, a .heimu, a.new .heimu, span.heimu a:visited { color: var(--heimu-color); text-shadow: none; } span.heimu:hover, span.heimu:active { color: var(--heimu-text-color); } /* ==== 彩幕效果 ==== */ .colormu-drk { color: #FFF; } .colormu-bri { color: #000; } .colormu-drk:not(.colormu_toggle_on) a { color: #add8e6; } .colormu-drk:not(.colormu_toggle_on) a.new { color: #FCC; } .colormu>span, .colormu a, .colormu a>span { transition: color 0.2s; } .colormu:not(:hover):not(:active):not(.colormu_toggle_on)>span, .colormu:not(:hover):not(:active):not(.colormu_toggle_on) a { color: transparent; } .colormu:not(:hover):not(:active):not(.colormu_toggle_on) a>span { color: transparent !important; } /* ==== 特殊区块样式 ==== */ /* 引用块 */ blockquote { margin: 1em 0; padding: 0.5em 1em; border-left: 3px solid rgba(var(--bright-accent), 0.7); background-color: rgba(var(--white-monochrome), 0.5); box-shadow: 0.05rem 0.1rem 0.3rem rgba(0,0,0,.25); } /* 亮色样式引用 */ .lightstyled-quote { background-color: rgb(var(--bright-accent)); color: rgb(0, 0, 0); border-left: 0.5rem solid rgba(var(--dark-gray-monochrome)); padding: 0.1rem 1rem; margin: 0.5rem 0 0.5rem 0.25rem; box-shadow: 0.05rem 0.1rem 0.3rem rgba(0,0,0,.25); } /* 暗色样式引用 */ .darkstyled-quote { background-color: rgb(var(--dark-gray-monochrome)); border-left: 0.5rem solid rgba(var(--bright-accent)); color: rgb(var(--white-monochrome)); padding: 0.1rem 1rem; margin: 0.5rem 0 0.5rem 0.25rem; box-shadow: 0.05rem 0.1rem 0.3rem rgba(0,0,0,.25); } .darkstyled-quote a { color: rgb(var(--swatch-menubg-medium-color)); } /* 亮色块 */ .lightblock { background-color: rgb(var(--bright-accent)); color: rgb(0, 0, 0); padding: 0.01rem 1rem; margin: 0.5rem 0 0.5rem 0.25rem; box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); } /* 暗色块 */ .darkblock { background-color: rgb(var(--dark-gray-monochrome)); color: rgb(var(--white-monochrome)); padding: 0.01rem 1rem; margin: 0.5rem 0 0.5rem 0.25rem; box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); } /* 带边框的暗色块 */ .dark-borderblock { background-color: rgb(var(--dark-gray-monochrome)); color: rgb(var(--white-monochrome)); padding: 0.01rem 1rem; margin: 0.5rem 0 0.5rem 0.25rem; box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); border: solid 0.3rem rgb(var(--bright-accent)); } /* 带边框的亮色块 */ .light-borderblock { background-color: rgb(var(--bright-accent)); color: rgb(0, 0, 0); padding: 0.01rem 1rem; margin: 0.5rem 0 0.5rem 0.25rem; box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); border: solid 0.3rem rgb(var(--dark-gray-monochrome)); } /* 带Logo的边框块 */ .border-logoblock { padding: 0.01rem 1rem; box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); color: rgb(var(--white-monochrome)); margin: 0.5rem 0 0.5rem 0.25rem; display: block; position: relative; background-color: rgb(var(--dark-gray-monochrome)); border: solid 0.3rem rgb(var(--bright-accent)); } /* Logo块 */ .logoblock { padding: 0.01rem 1rem; color: rgb(var(--white-monochrome)); box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.25); margin: 0.5rem 0 0.5rem 0.25rem; display: block; position: relative; background-color: rgb(var(--dark-gray-monochrome)); } /* 带标题的块 */ .titleblock { background-color: rgb(var(--dark-gray-monochrome)); color: rgb(var(--white-monochrome)); padding: 0.5rem 1rem 0.10rem; margin: 1.5rem 0rem 0.5rem 0rem; box-shadow: 0 0.2rem 0.3rem rgba(0,0,0,.5); border: solid rgb(var(--bright-accent)) 2px; } .titlebox { color: rgb(var(--dark-gray-monochrome)); position: relative; top: -1.6rem; background-color: rgb(var(--bright-accent)); padding: 0.25rem 1rem; line-height: 0.1rem; } /* ==== 表格样式 ==== */ table { border-collapse: collapse; border-spacing: 0; margin: 1em 0; } table th { background-color: rgba(var(--bright-accent), 0.2); font-weight: bold; text-align: center; padding: 6px; border: 1px solid var(--custom-border-gray); } table td { padding: 4px 6px; border: 1px solid var(--custom-border-gray); } table tr:nth-child(odd) { background-color: rgba(var(--white-monochrome), 0.8); } table tr:nth-child(even) { background-color: rgba(var(--white-monochrome), 0.6); } /* ==== 列表样式 ==== */ ul, ol { padding-left: 2em; margin: 1em 0; } li { margin: 0.3em 0; } /* ==== 代码和预格式化文本 ==== */ pre, code, tt, kbd, samp { font-family: var(--mono-font); background-color: var(--custom-code-background, #f8f9fa); padding: 1px 3px; border-radius: 2px; } pre { padding: 8px; overflow-x: auto; line-height: 1.4; border: 1px solid rgba(var(--black-monochrome), 0.1); } /* ==== 表单元素 ==== */ input, button, select, textarea { font-family: var(--UI-font); font-size: 0.9rem; padding: 4px 8px; border: 1px solid var(--custom-border-gray); border-radius: 3px; } button, input[type="button"], input[type="submit"] { background-color: rgba(var(--bright-accent), 0.1); cursor: pointer; transition: background-color 0.2s; } button:hover, input[type="button"]:hover, input[type="submit"]:hover { background-color: rgba(var(--bright-accent), 0.2); } /* ==== 选中文本样式 ==== */ ::selection { background: rgba(var(--bright-accent), 0.25); text-shadow: none; } /* ==== 滚动条样式 ==== */ ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: #f1f1f1; } ::-webkit-scrollbar-thumb { background: rgba(var(--bright-accent), 0.5); border-radius: 5px; } ::-webkit-scrollbar-thumb:hover { background: rgba(var(--bright-accent), 0.7); } /* ==== 导航框样式 ==== */ table.navbox { border: 1px solid #aaa; clear: both; margin: auto; padding: 1px; text-align: center; width: 100%; background: var(--theme-card-background-color, #fdfdfd); } table.navbox + table.navbox { margin-top: -1px; } .navbox-title, .navbox-abovebelow, table.navbox th { padding-left: 1em; padding-right: 1em; text-align: center; background: none repeat scroll 0 0 rgba(var(--bright-accent), 0.2); } .navbox-group { font-weight: 700; white-space: nowrap; } /* ==== 响应式设计 ==== */ @media all and (max-width: 511px) { .notaninfobox { float: none; margin-left: 0; width: auto; } /* 在小屏幕上减弱扫描线效果 */ :root { --scanline-color: rgba(229, 140, 36, 0.03); --scanline-size: 3px; } } @media only screen and (max-width: 759px) { .infotable { width: 90%; float: none; margin: 0 auto; } .navbox-title > div { display: none; } .navbox-group, .navbox-group > div { padding-left: 0 !important; padding-right: 0 !important; text-align: center; } } /* ==== 打印样式 ==== */ @media print { body::before, body::after, #content::before { display: none; } } /* ==== 工具辅助类 ==== */ /* 旋转特效 */ .hovers-rotate { transition-duration: 0.5s; transform: rotate(0); } .hovers-rotate:hover { transition-duration: 0.5s; transform: rotate(360deg); } /* 缩放特效 */ .hovers-grow { transform: scale(1); transition: transform 0.3s ease; } .hovers-grow:hover { transform: scale(1.25); } /* 模块框 */ .modulebox { border: 1px solid #ccc; padding: 10px; margin: 10px 0; background-color: #f9f9f9; }