MediaWiki:Mainpage.css:修订间差异
MediaWiki界面页面
更多操作
删除的内容 添加的内容
Maintenance script(留言 | 贡献) 首页样式使用 ASCII 页类名 |
Maintenance script(留言 | 贡献) Mainpage.css 清空并提示已迁移 标签:替换 |
||
| 第1行: | 第1行: | ||
/* 首页样式 |
/* 首页样式已迁移至 MediaWiki:Common.css */ |
||
body.page-Main_Page .banner { |
|||
height: auto; |
|||
display: flex; |
|||
flex-direction: column; |
|||
justify-content: center; |
|||
align-items: center; |
|||
background: linear-gradient(135deg, #8B0000, #B22222); /* 改进对比度 */ |
|||
color: white; |
|||
font-weight: bold; |
|||
border-radius: 12px; |
|||
padding: 12px 24px; |
|||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); |
|||
text-align: center; |
|||
} |
|||
body.page-Main_Page .banner-text { |
|||
margin: 0; |
|||
line-height: 1.4; |
|||
} |
|||
body.page-Main_Page .banner .chinese-text { |
|||
font-size: 24px; |
|||
font-weight: 700; |
|||
} |
|||
body.page-Main_Page .banner .english-text { |
|||
font-size: 16px; |
|||
font-weight: 500; |
|||
opacity: 0.9; |
|||
} |
|||
/* 当屏幕宽度大于 768px(如平板和大屏幕设备) */ |
|||
@media screen and (min-width: 768px) { |
|||
body.page-Main_Page .banner .chinese-text { |
|||
font-size: 28px; |
|||
} |
|||
body.page-Main_Page .banner .english-text { |
|||
font-size: 18px; |
|||
} |
|||
} |
|||
/* 当屏幕宽度小于 480px(如手机设备) */ |
|||
@media screen and (max-width: 480px) { |
|||
body.page-Main_Page .banner .chinese-text { |
|||
font-size: 20px; |
|||
} |
|||
body.page-Main_Page .banner .english-text { |
|||
font-size: 14px; |
|||
} |
|||
} |
|||
/* 内容块样式 */ |
|||
body.page-Main_Page .content-box { |
|||
margin: 10px; |
|||
padding: 20px; |
|||
border-radius: 10px; |
|||
border: 1px solid #e0e0e0; |
|||
-webkit-transition: -webkit-transform 0.3s ease, box-shadow 0.3s ease; |
|||
transition: transform 0.3s ease, box-shadow 0.3s ease; |
|||
will-change: transform; /* 性能优化 */ |
|||
backface-visibility: hidden; /* 性能优化 */ |
|||
} |
|||
body.page-Main_Page .content-box:hover { |
|||
-webkit-transform: translateY(-5px); |
|||
-moz-transform: translateY(-5px); |
|||
transform: translateY(-5px); |
|||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); |
|||
} |
|||
body.page-Main_Page .content-box:focus { |
|||
outline: 2px solid #0066cc; /* 可访问性改进 */ |
|||
outline-offset: 2px; |
|||
} |
|||
body.page-Main_Page .content-box h2 { |
|||
position: relative; |
|||
padding-bottom: 10px; |
|||
margin-bottom: 10px; |
|||
border-bottom: 2px solid red; |
|||
} |
|||
body.page-Main_Page .content-box p { |
|||
line-height: 1.6; |
|||
} |
|||
/* Flex 容器 */ |
|||
body.page-Main_Page .flex-container { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
gap: 20px; |
|||
} |
|||
body.page-Main_Page .flex-container .content-box { |
|||
flex: 1; |
|||
max-width: 33.33%; |
|||
box-sizing: border-box; |
|||
} |
|||
/* 移动端优化 */ |
|||
@media (max-width: 768px) { |
|||
body.page-Main_Page .flex-container { |
|||
flex-direction: column; |
|||
gap: 15px; /* 统一间距 */ |
|||
} |
|||
body.page-Main_Page .flex-container .content-box { |
|||
max-width: none; /* 移除限制 */ |
|||
width: 100%; |
|||
margin-bottom: 0; /* 统一使用 gap */ |
|||
} |
|||
body.page-Main_Page .banner .chinese-text, |
|||
body.page-Main_Page .banner .english-text { |
|||
text-align: center; |
|||
} |
|||
body.page-Main_Page .banner .chinese-text { |
|||
font-size: 20px; |
|||
} |
|||
body.page-Main_Page .banner .english-text { |
|||
font-size: 14px; |
|||
} |
|||
} |
|||
/* 为减少动画的用户提供支持 */ |
|||
@media (prefers-reduced-motion: reduce) { |
|||
body.page-Main_Page .content-box { |
|||
-webkit-transition: none; |
|||
transition: none; |
|||
} |
|||
body.page-Main_Page .content-box:hover { |
|||
-webkit-transform: none; |
|||
-moz-transform: none; |
|||
transform: none; |
|||
} |
|||
} |
|||
/* 暗色模式覆盖(Citizen: night) */ |
|||
.skin-theme-clientpref-night body.page-Main_Page .banner { |
|||
background: linear-gradient(135deg, #3a0c0c, #5a1a1a); |
|||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); |
|||
} |
|||
.skin-theme-clientpref-night body.page-Main_Page .content-box { |
|||
border-color: #2f2f2f; |
|||
background-color: #1c1c1c; |
|||
} |
|||
.skin-theme-clientpref-night body.page-Main_Page .content-box:hover { |
|||
box-shadow: 0 10px 22px rgba(0, 0, 0, 0.55); |
|||
} |
|||
.skin-theme-clientpref-night body.page-Main_Page .content-box:focus { |
|||
outline-color: #5ea0ff; |
|||
} |
|||
.skin-theme-clientpref-night body.page-Main_Page .content-box h2 { |
|||
border-bottom-color: #b94a4a; |
|||
} |
|||