MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 标签:手工回退 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* 电脑端样式 */ | /* 电脑端样式 - 默认一行3个(大屏幕) */ | ||
. | .flex-gallery { | ||
display: grid; | |||
grid-template-columns: repeat(3, 1fr); | |||
gap: 10px; | |||
align-items: flex-start; | |||
} | } | ||
. | |||
/* 所有卡片通用样式 */ | |||
padding- | .gallery-card, | ||
.gallery-card-small { | |||
position: relative; | |||
width: 100%; | |||
text-align: center; | |||
} | |||
/* 图片自动缩放 */ | |||
.gallery-card img, | |||
.gallery-card-small img { | |||
width: 100%; | |||
height: auto; | |||
max-width: 100%; | |||
} | |||
/* 文字覆盖层 */ | |||
.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; | |||
font-size: 14px; | |||
} | |||
/* 中等屏幕(1200px以下)改为一行2个 */ | |||
@media screen and (max-width: 1200px) { | |||
.flex-gallery { | |||
grid-template-columns: repeat(2, 1fr); | |||
} | |||
} | |||
/* 平板端(900px以下)保持一行2个 */ | |||
@media screen and (max-width: 900px) { | |||
.flex-gallery { | |||
grid-template-columns: repeat(2, 1fr); | |||
gap: 10px; | |||
} | |||
} | } | ||
/* | /* 手机端样式(768px以下) */ | ||
@media screen and (max-width: 768px) { | @media screen and (max-width: 768px) { | ||
.responsive-two-columns, | .responsive-two-columns, | ||
| 第24行: | 第66行: | ||
} | } | ||
. | .flex-gallery { | ||
max-width: | grid-template-columns: repeat(2, 1fr); | ||
gap: 8px; | |||
} | |||
.image-overlay { | |||
bottom: 15px; | |||
left: 5px; | |||
font-size: 12px; | |||
padding: 3px 5px; | |||
} | |||
} | |||
/* 超小屏幕(500px以下)改为一行1个 */ | |||
@media screen and (max-width: 500px) { | |||
.flex-gallery { | |||
grid-template-columns: 1fr; | |||
gap: 10px; | |||
} | } | ||
} | } | ||
2026年4月25日 (六) 01:46的版本
/* 电脑端样式 - 默认一行3个(大屏幕) */
.flex-gallery {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
align-items: flex-start;
}
/* 所有卡片通用样式 */
.gallery-card,
.gallery-card-small {
position: relative;
width: 100%;
text-align: center;
}
/* 图片自动缩放 */
.gallery-card img,
.gallery-card-small img {
width: 100%;
height: auto;
max-width: 100%;
}
/* 文字覆盖层 */
.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;
font-size: 14px;
}
/* 中等屏幕(1200px以下)改为一行2个 */
@media screen and (max-width: 1200px) {
.flex-gallery {
grid-template-columns: repeat(2, 1fr);
}
}
/* 平板端(900px以下)保持一行2个 */
@media screen and (max-width: 900px) {
.flex-gallery {
grid-template-columns: repeat(2, 1fr);
gap: 10px;
}
}
/* 手机端样式(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;
}
.flex-gallery {
grid-template-columns: repeat(2, 1fr);
gap: 8px;
}
.image-overlay {
bottom: 15px;
left: 5px;
font-size: 12px;
padding: 3px 5px;
}
}
/* 超小屏幕(500px以下)改为一行1个 */
@media screen and (max-width: 500px) {
.flex-gallery {
grid-template-columns: 1fr;
gap: 10px;
}
}