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