MediaWiki:Common.css:修订间差异
跳转到导航
跳转到搜索
创建页面,内容为“→这里放置的CSS将应用于所有皮肤: →针对 Vector 皮肤的 Logo 缩放修补: .mw-wiki-logo { background-size: contain; →确保图片完整显示在框内: width: 160px; →根据你的侧边栏宽度调整: height: 160px; →根据你的侧边栏高度调整: }” |
无编辑摘要 |
||
| (未显示同一用户的6个中间版本) | |||
| 第1行: | 第1行: | ||
/* | /* 首页容器:使用 Grid 布局,自动适应屏幕宽度 */ | ||
.main-page-grid { | |||
display: grid; | |||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |||
gap: 20px; | |||
margin-top: 20px; | |||
} | |||
/* | /* 卡片整体样式 */ | ||
. | .nav-box { | ||
border: 1px solid #e0e0e0; | |||
width: | border-radius: 8px; | ||
box-shadow: 0 2px 5px rgba(0,0,0,0.05); | |||
overflow: hidden; /* 确保圆角不被内部元素遮挡 */ | |||
background: #fff; | |||
transition: transform 0.2s; | |||
} | |||
.nav-box:hover { | |||
transform: translateY(-3px); | |||
box-shadow: 0 5px 15px rgba(0,0,0,0.1); | |||
} | |||
/* 卡片标题 */ | |||
.nav-header { | |||
color: #fff; | |||
padding: 10px 15px; | |||
font-weight: bold; | |||
font-size: 1.1em; | |||
} | |||
/* 卡片内容区域 */ | |||
.nav-content { | |||
padding: 15px; | |||
line-height: 1.8; | |||
} | |||
/* 去掉列表原本的圆点,改成更像导航的样式 */ | |||
.nav-content ul { | |||
list-style: none; | |||
margin: 0; | |||
padding: 0; | |||
} | |||
.nav-content li { | |||
margin-bottom: 6px; | |||
border-bottom: 1px dashed #eee; | |||
padding-bottom: 4px; | |||
} | |||
.nav-content li:last-child { | |||
border-bottom: none; | |||
} | |||
.nav-content a { | |||
text-decoration: none; | |||
color: #333; | |||
font-weight: 500; | |||
} | |||
.nav-content a:hover { | |||
color: #0056b3; | |||
text-decoration: underline; | |||
} | |||
/* 针对小屏幕的微调 */ | |||
@media screen and (max-width: 600px) { | |||
.main-page-grid { | |||
grid-template-columns: 1fr; | |||
} | |||
} | |||
/* 针对首页隐藏主标题 */ | |||
.page-Main_Page #firstHeading { | |||
display: none; | |||
} | |||
/* 针对 MediaWiki 架构的精准打击 */ | |||
.mw-body, .mw-parser-output, h1, h2, h3, h4, h5, h6 { | |||
font-family: "Consolas", "Microsoft YaHei", sans-serif !important; | |||
} | } | ||
2026年1月30日 (五) 06:38的最新版本
/* 首页容器:使用 Grid 布局,自动适应屏幕宽度 */
.main-page-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin-top: 20px;
}
/* 卡片整体样式 */
.nav-box {
border: 1px solid #e0e0e0;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
overflow: hidden; /* 确保圆角不被内部元素遮挡 */
background: #fff;
transition: transform 0.2s;
}
.nav-box:hover {
transform: translateY(-3px);
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
/* 卡片标题 */
.nav-header {
color: #fff;
padding: 10px 15px;
font-weight: bold;
font-size: 1.1em;
}
/* 卡片内容区域 */
.nav-content {
padding: 15px;
line-height: 1.8;
}
/* 去掉列表原本的圆点,改成更像导航的样式 */
.nav-content ul {
list-style: none;
margin: 0;
padding: 0;
}
.nav-content li {
margin-bottom: 6px;
border-bottom: 1px dashed #eee;
padding-bottom: 4px;
}
.nav-content li:last-child {
border-bottom: none;
}
.nav-content a {
text-decoration: none;
color: #333;
font-weight: 500;
}
.nav-content a:hover {
color: #0056b3;
text-decoration: underline;
}
/* 针对小屏幕的微调 */
@media screen and (max-width: 600px) {
.main-page-grid {
grid-template-columns: 1fr;
}
}
/* 针对首页隐藏主标题 */
.page-Main_Page #firstHeading {
display: none;
}
/* 针对 MediaWiki 架构的精准打击 */
.mw-body, .mw-parser-output, h1, h2, h3, h4, h5, h6 {
font-family: "Consolas", "Microsoft YaHei", sans-serif !important;
}