MediaWiki:Common.css
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer或Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:按 Ctrl-F5。
/* 这里放置的CSS将应用于所有皮肤 */
/* =====================================================
MAIN PAGE ONLY STYLE
Griffin Wiki Homepage (Wikipedia-style + Nation Portal)
===================================================== */
/* =========================
仅主页生效(关键)
========================= */
body.page-Main_Page .mw-body,
body.page-主页 .mw-body {
max-width: 1100px;
margin: 0 auto;
}
/* =========================
顶部 Banner(维基百科风格)
========================= */
.mainpage-banner {
text-align: center;
padding: 28px 20px;
margin: 10px 0 30px 0;
border-bottom: 1px solid #e6e6e6;
}
.mainpage-banner h1 {
font-size: 2.4em;
font-weight: bold;
margin: 0;
}
.mainpage-banner {
font-size: 14px;
color: #555;
line-height: 1.7;
}
.mainpage-banner em {
display: block;
margin-top: 6px;
color: #777;
font-style: normal;
}
/* =========================
简介框(类似 Wikipedia intro)
========================= */
.mainpage-intro {
max-width: 900px;
margin: 0 auto 30px auto;
background: #f8f9fa;
border: 1px solid #ddd;
border-radius: 10px;
padding: 18px 22px;
font-size: 15px;
line-height: 1.8;
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
/* =========================
首页模块卡片系统(核心)
========================= */
.mainpage-module {
background: #ffffff;
border: 1px solid #e6e6e6;
border-radius: 12px;
padding: 16px 18px;
margin-bottom: 18px;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* hover 轻浮起 */
.mainpage-module:hover {
transform: translateY(-2px);
box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
/* 模块标题 */
.mainpage-module h2 {
font-size: 1.2em;
border-bottom: 1px solid #eee;
padding-bottom: 6px;
margin-bottom: 12px;
}
/* =========================
首页两栏布局(Wikipedia Portal风格)
========================= */
.mainpage-columns {
display: flex;
gap: 18px;
align-items: flex-start;
}
.mainpage-left {
flex: 2;
}
.mainpage-right {
flex: 1;
}
/* 响应式 */
@media (max-width: 900px) {
.mainpage-columns {
flex-direction: column;
}
}
/* =========================
最新条目 / 列表增强
========================= */
.mainpage-module ul {
padding-left: 18px;
}
.mainpage-module li {
margin-bottom: 6px;
transition: transform 0.15s ease;
}
.mainpage-module li:hover {
transform: translateX(3px);
}
/* =========================
首页链接强化(轻UI感)
========================= */
body.page-Main_Page a {
color: #3366cc;
}
body.page-Main_Page a:hover {
text-decoration: underline;
}
/* =========================
首页轻微氛围(不影响阅读)
========================= */
body.page-Main_Page::before {
content: "";
position: fixed;
inset: 0;
pointer-events: none;
z-index: -1;
background:
radial-gradient(circle at 20% 10%, rgba(51,102,255,0.05), transparent 40%),
radial-gradient(circle at 80% 90%, rgba(255,79,163,0.04), transparent 45%);
}