MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 标签:已被回退 |
||
| 第1行: | 第1行: | ||
/* 电脑端样式 */ | /* ===== 自定义背景图片(适配多比例) ===== */ | ||
.skin-citizen { | |||
background-color: #f5f5f5; /* 亮色模式兜底色 */ | |||
background-image: url('/w/images/背景图片实际路径/light.jpg'); | |||
background-size: cover; | |||
background-position: center center; | |||
background-repeat: no-repeat; | |||
background-attachment: fixed; | |||
} | |||
.skin-theme-clientpref-night { | |||
background-color: #0d0e12; /* 暗色模式兜底色 */ | |||
background-image: url('/w/images/背景图片实际路径/dark.jpg'); | |||
background-size: cover; | |||
background-position: center center; | |||
background-repeat: no-repeat; | |||
background-attachment: fixed; | |||
} | |||
/* 超宽屏(>1920px):确保背景填满 */ | |||
@media screen and (min-width: 1921px) { | |||
.skin-citizen, | |||
.skin-theme-clientpref-night { | |||
background-size: cover; | |||
} | |||
} | |||
/* 竖屏手机(宽度<高度):聚焦中央区域 */ | |||
@media screen and (max-width: 768px) and (orientation: portrait) { | |||
.skin-citizen, | |||
.skin-theme-clientpref-night { | |||
background-attachment: scroll; /* 手机端 fixed 会有性能问题,改 scroll */ | |||
background-position: center center; | |||
background-size: cover; | |||
} | |||
} | |||
/* 横屏手机/平板:聚焦中央 */ | |||
@media screen and (max-width: 1024px) and (orientation: landscape) { | |||
.skin-citizen, | |||
.skin-theme-clientpref-night { | |||
background-position: center center; | |||
background-size: cover; | |||
} | |||
} | |||
/* 低性能设备:禁用 fixed 防止闪烁 */ | |||
@media (prefers-reduced-motion: reduce) { | |||
.skin-citizen, | |||
.skin-theme-clientpref-night { | |||
background-attachment: scroll; | |||
} | |||
} | |||
/* ===== 电脑端样式 ===== */ | |||
.responsive-two-columns .left-col { | .responsive-two-columns .left-col { | ||
width: 320px; | width: 320px; | ||
| 第12行: | 第66行: | ||
.gallery-card { | .gallery-card { | ||
position: relative; | position: relative; | ||
width: calc(50% - 5px); | width: calc(50% - 5px); | ||
max-width: 500px; | max-width: 500px; | ||
text-align: center; | text-align: center; | ||
| 第51行: | 第105行: | ||
/* === 手机端响应式(768px以下) === */ | /* === 手机端响应式(768px以下) === */ | ||
@media screen and (max-width: 768px) { | @media screen and (max-width: 768px) { | ||
.responsive-two-columns, | .responsive-two-columns, | ||
.responsive-two-columns tbody, | .responsive-two-columns tbody, | ||
| 第59行: | 第112行: | ||
width: 100%; | width: 100%; | ||
} | } | ||
.responsive-two-columns .right-col { | .responsive-two-columns .right-col { | ||
padding-left: 0; | padding-left: 0; | ||
margin-top: 20px; | margin-top: 20px; | ||
} | } | ||
.responsive-two-columns img { | .responsive-two-columns img { | ||
max-width: 100%; | max-width: 100%; | ||
height: auto; | height: auto; | ||
} | } | ||
.gallery-card, | .gallery-card, | ||
.gallery-card-small { | .gallery-card-small { | ||
| 第76行: | 第128行: | ||
max-width: none; | max-width: none; | ||
} | } | ||
.pvz-navigation { | .pvz-navigation { | ||
float: none; | float: none; | ||
| 第83行: | 第134行: | ||
width: 100%; | width: 100%; | ||
} | } | ||
.pvz-navigation .nav-table { | .pvz-navigation .nav-table { | ||
display: flex; | display: flex; | ||
| 第91行: | 第142行: | ||
width: 100%; | width: 100%; | ||
} | } | ||
.pvz-navigation .nav-table tbody { | .pvz-navigation .nav-table tbody { | ||
display: contents; | display: contents; | ||
} | } | ||
.pvz-navigation .nav-table tr { | .pvz-navigation .nav-table tr { | ||
display: contents; | display: contents; | ||
} | } | ||
.pvz-navigation .nav-table td { | .pvz-navigation .nav-table td { | ||
display: block; | display: block; | ||
flex: 0 0 calc(33.33% - 5px); | flex: 0 0 calc(33.33% - 5px); | ||
width: auto !important; | width: auto !important; | ||
padding: 4px; | padding: 4px; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
} | } | ||
.pvz-navigation .nav-table td img { | .pvz-navigation .nav-table td img { | ||
width: 100%; | width: 100%; | ||
| 第113行: | 第164行: | ||
height: auto; | height: auto; | ||
} | } | ||
.pvz-navigation .nav-title { | .pvz-navigation .nav-title { | ||
font-size: 1.2em; | font-size: 1.2em; | ||
| 第119行: | 第170行: | ||
} | } | ||
@media screen and (max-width: 480px) { | @media screen and (max-width: 480px) { | ||
.gallery-card, | .gallery-card, | ||
| 第126行: | 第176行: | ||
} | } | ||
} | } | ||
/* 只有带链接且不在card/轮播内的图片才有悬停放大效果 */ | /* 只有带链接且不在card/轮播内的图片才有悬停放大效果 */ | ||
a img { | a img { | ||
| 第137行: | 第188行: | ||
} | } | ||
.card a img, | .card a img, | ||
.swiper a img, | .swiper a img, | ||
| 第155行: | 第205行: | ||
transform: none; | transform: none; | ||
} | } | ||
/* === 表格响应式:电脑一行5个,手机自动换行 === */ | /* === 表格响应式:电脑一行5个,手机自动换行 === */ | ||
@media screen and (min-width: 769px) { | |||
.responsive-fixed-grid { | |||
width: auto; | |||
margin: 0 auto; | |||
table-layout: fixed; | |||
} | |||
.responsive-fixed-grid td { | |||
width: 20%; | |||
padding: 5px; | |||
text-align: center; | |||
box-sizing: border-box; | |||
} | |||
.responsive-fixed-grid td img { | |||
max-width: 100%; | |||
height: auto; | |||
} | |||
} | } | ||
@media screen and (max-width: 768px) { | @media screen and (max-width: 768px) { | ||
.responsive-fixed-grid { | |||
display: flex; | |||
flex-wrap: wrap; | |||
justify-content: center; | |||
gap: 5px; | |||
width: 100%; | |||
} | |||
.responsive-fixed-grid tbody, | |||
.responsive-fixed-grid tr { | |||
display: contents; | |||
} | |||
.responsive-fixed-grid td { | |||
display: block; | |||
flex: 0 1 auto; | |||
max-width: calc(33.33% - 6px); | |||
width: auto; | |||
padding: 3px; | |||
text-align: center; | |||
box-sizing: border-box; | |||
} | |||
.responsive-fixed-grid td img { | |||
max-width: 100%; | |||
height: auto; | |||
display: block; | |||
} | |||
} | } | ||
@media screen and (max-width: 480px) { | @media screen and (max-width: 480px) { | ||
.responsive-fixed-grid td { | |||
max-width: calc(50% - 5px); | |||
} | |||
} | } | ||
.responsive-img { | .responsive-img { | ||
width: 100%; | width: 100%; | ||
| 第221行: | 第269行: | ||
max-width: 750px; | max-width: 750px; | ||
} | } | ||
img { | img { | ||
max-width: 100%; | max-width: 100%; | ||
height: auto; | height: auto; | ||
} | } | ||
.responsive-two-columns { | .responsive-two-columns { | ||
padding-left: 50px; | padding-left: 50px; | ||
| 第236行: | 第285行: | ||
} | } | ||
} | } | ||
@media screen and (min-width: 769px) { | @media screen and (min-width: 769px) { | ||
.responsive-two-columns { | .responsive-two-columns { | ||
| 第242行: | 第291行: | ||
} | } | ||
} | } | ||
.responsive-img img { | .responsive-img img { | ||
max-width: 100%; | max-width: 100%; | ||
height: auto; | height: auto; | ||
} | } | ||
2026年5月18日 (一) 05:43的版本
/* ===== 自定义背景图片(适配多比例) ===== */
.skin-citizen {
background-color: #f5f5f5; /* 亮色模式兜底色 */
background-image: url('/w/images/背景图片实际路径/light.jpg');
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
}
.skin-theme-clientpref-night {
background-color: #0d0e12; /* 暗色模式兜底色 */
background-image: url('/w/images/背景图片实际路径/dark.jpg');
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
}
/* 超宽屏(>1920px):确保背景填满 */
@media screen and (min-width: 1921px) {
.skin-citizen,
.skin-theme-clientpref-night {
background-size: cover;
}
}
/* 竖屏手机(宽度<高度):聚焦中央区域 */
@media screen and (max-width: 768px) and (orientation: portrait) {
.skin-citizen,
.skin-theme-clientpref-night {
background-attachment: scroll; /* 手机端 fixed 会有性能问题,改 scroll */
background-position: center center;
background-size: cover;
}
}
/* 横屏手机/平板:聚焦中央 */
@media screen and (max-width: 1024px) and (orientation: landscape) {
.skin-citizen,
.skin-theme-clientpref-night {
background-position: center center;
background-size: cover;
}
}
/* 低性能设备:禁用 fixed 防止闪烁 */
@media (prefers-reduced-motion: reduce) {
.skin-citizen,
.skin-theme-clientpref-night {
background-attachment: scroll;
}
}
/* ===== 电脑端样式 ===== */
.responsive-two-columns .left-col {
width: 320px;
vertical-align: top;
}
.responsive-two-columns .right-col {
vertical-align: top;
padding-left: 20px;
}
/* 新增:响应式图片卡片样式 */
.gallery-card {
position: relative;
width: calc(50% - 5px);
max-width: 500px;
text-align: center;
}
.gallery-card-small {
position: relative;
width: calc(50% - 5px);
max-width: 150px;
text-align: center;
}
.gallery-card img,
.gallery-card-small img {
width: 100%;
height: auto;
}
.image-overlay {
position: absolute;
bottom: 30px;
left: 10px;
text-align: left;
background: rgba(0,0,0,0.5);
color: white;
padding: 5px;
border-radius: 4px;
}
.flex-gallery {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
gap: 10px;
align-items: flex-start;
}
/* === 手机端响应式(768px以下) === */
@media screen and (max-width: 768px) {
.responsive-two-columns,
.responsive-two-columns tbody,
.responsive-two-columns tr,
.responsive-two-columns td {
display: block;
width: 100%;
}
.responsive-two-columns .right-col {
padding-left: 0;
margin-top: 20px;
}
.responsive-two-columns img {
max-width: 100%;
height: auto;
}
.gallery-card,
.gallery-card-small {
width: calc(50% - 5px);
max-width: none;
}
.pvz-navigation {
float: none;
max-width: 100%;
width: 100%;
}
.pvz-navigation .nav-table {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 5px;
width: 100%;
}
.pvz-navigation .nav-table tbody {
display: contents;
}
.pvz-navigation .nav-table tr {
display: contents;
}
.pvz-navigation .nav-table td {
display: block;
flex: 0 0 calc(33.33% - 5px);
width: auto !important;
padding: 4px;
box-sizing: border-box;
}
.pvz-navigation .nav-table td img {
width: 100%;
max-width: 120px;
height: auto;
}
.pvz-navigation .nav-title {
font-size: 1.2em;
}
}
@media screen and (max-width: 480px) {
.gallery-card,
.gallery-card-small {
width: 100%;
}
}
/* 只有带链接且不在card/轮播内的图片才有悬停放大效果 */
a img {
transition: transform 0.3s ease;
}
a img:hover {
transform: scale(1.08);
z-index: 10;
position: relative;
}
.card a img,
.swiper a img,
.carousel a img,
.slider a img,
.owl-carousel a img,
.flexslider a img {
transition: none;
}
.card a img:hover,
.swiper a img:hover,
.carousel a img:hover,
.slider a img:hover,
.owl-carousel a img:hover,
.flexslider a img:hover {
transform: none;
}
/* === 表格响应式:电脑一行5个,手机自动换行 === */
@media screen and (min-width: 769px) {
.responsive-fixed-grid {
width: auto;
margin: 0 auto;
table-layout: fixed;
}
.responsive-fixed-grid td {
width: 20%;
padding: 5px;
text-align: center;
box-sizing: border-box;
}
.responsive-fixed-grid td img {
max-width: 100%;
height: auto;
}
}
@media screen and (max-width: 768px) {
.responsive-fixed-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 5px;
width: 100%;
}
.responsive-fixed-grid tbody,
.responsive-fixed-grid tr {
display: contents;
}
.responsive-fixed-grid td {
display: block;
flex: 0 1 auto;
max-width: calc(33.33% - 6px);
width: auto;
padding: 3px;
text-align: center;
box-sizing: border-box;
}
.responsive-fixed-grid td img {
max-width: 100%;
height: auto;
display: block;
}
}
@media screen and (max-width: 480px) {
.responsive-fixed-grid td {
max-width: calc(50% - 5px);
}
}
.responsive-img {
width: 100%;
height: auto;
max-width: 750px;
}
img {
max-width: 100%;
height: auto;
}
.responsive-two-columns {
padding-left: 50px;
box-sizing: border-box;
}
@media screen and (max-width: 768px) {
.responsive-two-columns {
padding-left: 0 !important;
}
}
@media screen and (min-width: 769px) {
.responsive-two-columns {
margin-left: -50px !important;
}
}
.responsive-img img {
max-width: 100%;
height: auto;
}