MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第18行: | 第18行: | ||
/* CategoryTreeTag */ | /* CategoryTreeTag */ | ||
.CategoryTreeTag { | .CategoryTreeTag { | ||
display: | display: grid; | ||
grid-auto-flow: column; /* 关键:让项目垂直排列,然后换列 */ | |||
gap: 1em; /* | gap: 1em; /* 项目之间的间距 */ | ||
/* 默认情况下,有足够的空间时显示4列 */ | |||
grid-template-columns: repeat(4, 1fr); | |||
grid-template-rows: repeat(3, auto); | |||
} | } | ||
/* 针对不同屏幕宽度的响应式布局 */ | /* 针对不同屏幕宽度的响应式布局 */ | ||
@media (max-width: | @media (max-width: 1200px) { | ||
.CategoryTreeTag | .CategoryTreeTag { | ||
grid-template-columns: repeat(3, 1fr); | |||
grid-template-rows: repeat(4, auto); | |||
} | } | ||
} | } | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.CategoryTreeTag | .CategoryTreeTag { | ||
grid-template-columns: repeat(2, 1fr); | |||
grid-template-rows: repeat(6, auto); | |||
} | } | ||
} | } | ||
@media (max-width: 480px) { | @media (max-width: 480px) { | ||
.CategoryTreeTag | .CategoryTreeTag { | ||
grid-template-columns: 1fr; | |||
grid-template-rows: repeat(12, auto); | |||
} | } | ||
} | } | ||
2025年8月11日 (一) 14:55的版本
/* 这里放置的CSS将应用于所有皮肤 */
/* 隐藏分类页面的子页面 */
.mw-category-generated { display: none; }
.overworld-coordinate {
color: darkgreen;
}
.nether-coordinate {
color: crimson;
}
.end-coordinate {
color: purple;
}
/* CategoryTreeTag */
.CategoryTreeTag {
display: grid;
grid-auto-flow: column; /* 关键:让项目垂直排列,然后换列 */
gap: 1em; /* 项目之间的间距 */
/* 默认情况下,有足够的空间时显示4列 */
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(3, auto);
}
/* 针对不同屏幕宽度的响应式布局 */
@media (max-width: 1200px) {
.CategoryTreeTag {
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(4, auto);
}
}
@media (max-width: 768px) {
.CategoryTreeTag {
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(6, auto);
}
}
@media (max-width: 480px) {
.CategoryTreeTag {
grid-template-columns: 1fr;
grid-template-rows: repeat(12, auto);
}
}