MediaWiki:Common.css
MediaWiki界面页面
更多操作
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* ===== 自定义背景图片(适配多比例) ===== */
/* 亮色模式:覆盖 html + body + 内容层 */
html:not(.skin-theme-clientpref-night) {
background-color: #f5f5f5 !important;
background-image: url('/images/0/07/Light.jpg') !important;
background-size: cover !important;
background-position: center center !important;
background-repeat: no-repeat !important;
background-attachment: fixed !important;
}
html:not(.skin-theme-clientpref-night) body,
html:not(.skin-theme-clientpref-night) #content,
html:not(.skin-theme-clientpref-night) .mw-body,
html:not(.skin-theme-clientpref-night) .citizen-body,
html:not(.skin-theme-clientpref-night) .citizen-body-container {
background-color: transparent !important;
background-image: none !important;
}
/* 暗色模式:覆盖 html + body + 内容层 */
html.skin-theme-clientpref-night {
background-color: #0d0e12 !important;
background-image: url('/images/f/fc/Dark.jpg') !important;
background-size: cover !important;
background-position: center center !important;
background-repeat: no-repeat !important;
background-attachment: fixed !important;
}
html.skin-theme-clientpref-night body,
html.skin-theme-clientpref-night #content,
html.skin-theme-clientpf-night .mw-body,
html.skin-theme-clientpref-night .citizen-body,
html.skin-theme-clientpref-night .citizen-body-container {
background-color: transparent !important;
background-image: none !important;
}
/* 超宽屏 */
@media screen and (min-width: 1921px) {
html {
background-size: cover !important;
}
}
/* 竖屏手机 */
@media screen and (max-width: 768px) and (orientation: portrait) {
html {
background-attachment: scroll !important;
background-position: center center !important;
background-size: cover !important;
}
}
/* 横屏手机/平板 */
@media screen and (max-width: 1024px) and (orientation: landscape) {
html {
background-position: center center !important;
background-size: cover !important;
}
}
/* 低性能设备 */
@media (prefers-reduced-motion: reduce) {
html {
background-attachment: scroll !important;
}
}