打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
删除的内容 添加的内容
XP-jia留言 | 贡献
测试新版样式
标签已被回退
Maintenance script留言 | 贡献
首页样式小幅优化(选择器收敛与中间断点)
 
(未显示2个用户的20个中间版本)
第1行: 第1行:
/* 全局字体设置,覆盖东亚语言 */
/* =========================================================
✅ 全局字体设置(增强中日韩支持 + 系统一致性)
========================================================= */
body {
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
"Noto Sans", "Noto Sans CJK SC", "Noto Sans CJK TC", "Noto Sans JP",
"Noto Sans", "Noto Sans CJK SC", "Noto Sans CJK TC", "Noto Sans JP",
"Noto Sans KR", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
"Noto Sans KR", sans-serif, "PingFang SC", "Hiragino Sans GB",
"WenQuanYi Micro Hei", "SimSun", "SimHei", "Songti SC", "KaiTi",
"Microsoft YaHei", "WenQuanYi Micro Hei", "SimSun", "SimHei",
"MingLiU", "PMingLiU", "Microsoft JhengHei", "Malgun Gothic", sans-serif;
"Songti SC", "KaiTi", "MingLiU", "PMingLiU", "Microsoft JhengHei", "Malgun Gothic";
color: #222; /* 全站文字颜色微调 */
line-height: 1.6;
}
}


/* 2026-01-11: load Mainpage-specific styles from dedicated page */
/* =========================================================

🟥 Banner 横幅区(首页头部标语)

========================================================= */
/* 全站重定向链接样式 */
.hero-banner {
.mw-redirect {
display: flex;
color: #008000 !important; /* 使用 hex 颜色值,提高优先级 */
flex-direction: column;
justify-content: center;
font-weight: 500;
align-items: center;
background: linear-gradient(to right, #a50000, #e64545); /* ★ 柔和渐变色,替换原#b30000→#e64545 */
color: white;
font-weight: bold;
border-radius: 12px;
padding: 16px 28px;
margin-bottom: 24px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* ★ 阴影改淡,更符合 Citizen 扁平风格 */
text-align: center;
}
}


/* 重定向链接悬停效果 */
.hero-banner .chinese-text {
.mw-redirect:hover {
font-size: 28px;
color: #006400 !important;
font-weight: 700;
text-decoration: underline;
margin-bottom: 6px;
}
}


/* 导航框样式迁移至 Template:Navbox/styles.css */
.hero-banner .english-text {

font-size: 16px;
/* 语言链接样式 */
font-weight: 500;
#p-lang ul {
opacity: 0.9;
letter-spacing: 0.5px;
list-style: none;
padding: 0;
margin: 10px 0;
}
}


#p-lang li {
/* 副标题(可选项) */
display: inline-block;
.hero-banner .subtitle {
font-size: 14px;
margin-right: 10px;
}
color: rgba(255,255,255,0.85);
/* 2026-01-12: 首页样式从 LocalSettings.php 迁移到此处(仅首页生效) */
margin-top: 4px;
body.page-Main_Page .banner {
letter-spacing: 0.5px;
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;
}
}


body.page-Main_Page .banner-text {
/* 响应式调整 */
margin: 0 !important;
@media screen and (max-width: 768px) {
line-height: 1.4 !important;
.hero-banner .chinese-text { font-size: 22px; }
.hero-banner .english-text { font-size: 14px; }
}
}


body.page-Main_Page .banner .chinese-text {
/* =========================================================
font-size: 24px !important;
🧩 Section 模块容器(可重复使用)
font-weight: 700 !important;
========================================================= */
.homepage-section {
margin: 30px 0;
}
}


body.page-Main_Page .banner .english-text {
/* =========================================================
font-size: 16px !important;
📦 内容块(卡片样式)
font-weight: 500 !important;
========================================================= */
opacity: 0.9 !important;
.content-box {
background-color: #fff;
border-radius: 10px;
border: 1px solid #e0e0e0;
padding: 20px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
}


/* 当屏幕宽度大于 768px(如平板和大屏幕设备) */
.content-box:hover {
@media screen and (min-width: 768px) {
transform: translateY(-5px);
body.page-Main_Page .banner .chinese-text {
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
font-size: 28px !important;
}

body.page-Main_Page .banner .english-text {
font-size: 18px !important;
}
}
}


/* 当屏幕宽度小于 480px(如手机设备) */
/* 标题样式 */
@media screen and (max-width: 480px) {
.content-box h2 {
body.page-Main_Page .banner .chinese-text {
position: relative;
font-size: 20px !important;
padding-bottom: 10px;
}
margin-bottom: 10px;

border-bottom: 2px solid #b30000; /* ★ 颜色与 banner 主色统一 */
body.page-Main_Page .banner .english-text {
font-size: 1.25rem;
font-size: 14px !important;
}
}
}


/* 段落样式 */
/* 内容块样式 */
.content-box p {
body.page-Main_Page .content-box {
margin: 10px !important;
font-size: 0.95rem;
padding: 20px !important;
color: #333;
border-radius: 10px !important;
line-height: 1.7;
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; /* 性能优化 */
}
}


body.page-Main_Page .content-box:hover {
/* =========================================================
-webkit-transform: translateY(-5px) !important;
🧱 Flex 布局容器(多列展示)
-moz-transform: translateY(-5px) !important;
========================================================= */
transform: translateY(-5px) !important;
.flex-container {
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18) !important;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 24px; /* ★ 原 gap:20px → 改为 24px,空间更舒适 */
}
}


.flex-container .content-box {
body.page-Main_Page .content-box:focus {
outline: 2px solid #0066cc !important; /* 可访问性改进 */
flex: 1 1 calc(33.33% - 24px);
outline-offset: 2px !important;
box-sizing: border-box;
min-width: 250px; /* 避免在窄屏下压缩过头 */
}
}


body.page-Main_Page .content-box h2 {
/* 移动端改为单列 */
position: relative !important;
padding-bottom: 10px !important;
margin-bottom: 10px !important;
border-bottom: 2px solid red !important;
color: #333333 !important;
}

body.page-Main_Page .content-box p {
line-height: 1.6 !important;
color: #666666 !important;
}

/* Flex 容器 */
body.page-Main_Page .flex-container {
display: flex !important;
justify-content: space-between !important;
gap: 20px !important;
flex-wrap: wrap !important;
}

body.page-Main_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: 900px) {
body.page-Main_Page .flex-container .content-box {
max-width: 50% !important;
}
}


/* 移动端优化 */
@media (max-width: 768px) {
@media (max-width: 768px) {
.flex-container {
body.page-Main_Page .flex-container {
flex-direction: column;
flex-direction: column !important;
gap: 15px !important; /* 统一间距 */
}
}

.flex-container .content-box {
body.page-Main_Page .flex-container .content-box {
max-width: 100%;
max-width: 100% !important; /* 移除限制 */
margin-bottom: 20px;
width: 100% !important;
margin-bottom: 0 !important; /* 统一使用 gap */
}

body.page-Main_Page .banner .chinese-text,
body.page-Main_Page .banner .english-text {
text-align: center !important;
}

body.page-Main_Page .banner .chinese-text {
font-size: 20px !important;
}

body.page-Main_Page .banner .english-text {
font-size: 14px !important;
}
}
}
}


/* 为减少动画的用户提供支持 */
/* =========================================================
@media (prefers-reduced-motion: reduce) {
🌿 细节增强:重定向、页脚说明等
body.page-Main_Page .content-box {
========================================================= */
-webkit-transition: none !important;
.mw-redirect {
transition: none !important;
color: #009944; /* ★ 深绿色,较柔和 */
}

body.page-Main_Page .content-box:hover {
-webkit-transform: none !important;
-moz-transform: none !important;
transform: none !important;
}
}

/* 暗色模式覆盖(Citizen: night) */
.skin-theme-clientpref-night body.page-Main_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 body.page-Main_Page .content-box {
border-color: #2f2f2f !important;
background-color: #1c1c1c !important;
}

.skin-theme-clientpref-night body.page-Main_Page .content-box:hover {
box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5) !important;
}

.skin-theme-clientpref-night body.page-Main_Page .content-box:focus {
outline-color: #5ea0ff !important;
}

.skin-theme-clientpref-night body.page-Main_Page .content-box h2 {
border-bottom-color: #b94a4a !important;
color: #ffffff !important;
}
}


.skin-theme-clientpref-night body.page-Main_Page .content-box p {
/* 页脚标注(可在首页底部添加) */
color: #cccccc !important;
.footer-note {
text-align: center;
font-size: 13px;
color: #777;
margin-top: 40px;
border-top: 1px solid #eee;
padding-top: 12px;
letter-spacing: 0.3px;
}
}

2026年1月12日 (一) 23:57的最新版本

/* 全局字体设置,覆盖东亚语言 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
  "Noto Sans", "Noto Sans CJK SC", "Noto Sans CJK TC", "Noto Sans JP",
  "Noto Sans KR", sans-serif, "PingFang SC", "Hiragino Sans GB",
  "Microsoft YaHei", "WenQuanYi Micro Hei", "SimSun", "SimHei",
  "Songti SC", "KaiTi", "MingLiU", "PMingLiU", "Microsoft JhengHei", "Malgun Gothic";
}

/* 2026-01-11: load Mainpage-specific styles from dedicated page */


/* 全站重定向链接样式 */
.mw-redirect {
  color: #008000 !important; /* 使用 hex 颜色值,提高优先级 */
  font-weight: 500;
}

/* 重定向链接悬停效果 */
.mw-redirect:hover {
  color: #006400 !important;
  text-decoration: underline;
}

/* 导航框样式迁移至 Template:Navbox/styles.css */

/* 语言链接样式 */
#p-lang ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

#p-lang li {
  display: inline-block;
  margin-right: 10px;
}
/* 2026-01-12: 首页样式从 LocalSettings.php 迁移到此处(仅首页生效) */
body.page-Main_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;
}

body.page-Main_Page .banner-text {
  margin: 0 !important;
  line-height: 1.4 !important;
}

body.page-Main_Page .banner .chinese-text {
  font-size: 24px !important;
  font-weight: 700 !important;
}

body.page-Main_Page .banner .english-text {
  font-size: 16px !important;
  font-weight: 500 !important;
  opacity: 0.9 !important;
}

/* 当屏幕宽度大于 768px(如平板和大屏幕设备) */
@media screen and (min-width: 768px) {
  body.page-Main_Page .banner .chinese-text {
    font-size: 28px !important;
  }

  body.page-Main_Page .banner .english-text {
    font-size: 18px !important;
  }
}

/* 当屏幕宽度小于 480px(如手机设备) */
@media screen and (max-width: 480px) {
  body.page-Main_Page .banner .chinese-text {
    font-size: 20px !important;
  }

  body.page-Main_Page .banner .english-text {
    font-size: 14px !important;
  }
}

/* 内容块样式 */
body.page-Main_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; /* 性能优化 */
}

body.page-Main_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.18) !important;
}

body.page-Main_Page .content-box:focus {
  outline: 2px solid #0066cc !important; /* 可访问性改进 */
  outline-offset: 2px !important;
}

body.page-Main_Page .content-box h2 {
  position: relative !important;
  padding-bottom: 10px !important;
  margin-bottom: 10px !important;
  border-bottom: 2px solid red !important;
  color: #333333 !important;
}

body.page-Main_Page .content-box p {
  line-height: 1.6 !important;
  color: #666666 !important;
}

/* Flex 容器 */
body.page-Main_Page .flex-container {
  display: flex !important;
  justify-content: space-between !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
}

body.page-Main_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: 900px) {
  body.page-Main_Page .flex-container .content-box {
    max-width: 50% !important;
  }
}


/* 移动端优化 */
@media (max-width: 768px) {
  body.page-Main_Page .flex-container {
    flex-direction: column !important;
    gap: 15px !important; /* 统一间距 */
  }

  body.page-Main_Page .flex-container .content-box {
    max-width: 100% !important; /* 移除限制 */
    width: 100% !important;
    margin-bottom: 0 !important; /* 统一使用 gap */
  }

  body.page-Main_Page .banner .chinese-text,
  body.page-Main_Page .banner .english-text {
    text-align: center !important;
  }

  body.page-Main_Page .banner .chinese-text {
    font-size: 20px !important;
  }

  body.page-Main_Page .banner .english-text {
    font-size: 14px !important;
  }
}

/* 为减少动画的用户提供支持 */
@media (prefers-reduced-motion: reduce) {
  body.page-Main_Page .content-box {
    -webkit-transition: none !important;
    transition: none !important;
  }

  body.page-Main_Page .content-box:hover {
    -webkit-transform: none !important;
    -moz-transform: none !important;
    transform: none !important;
  }
}

/* 暗色模式覆盖(Citizen: night) */
.skin-theme-clientpref-night body.page-Main_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 body.page-Main_Page .content-box {
  border-color: #2f2f2f !important;
  background-color: #1c1c1c !important;
}

.skin-theme-clientpref-night body.page-Main_Page .content-box:hover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5) !important;
}

.skin-theme-clientpref-night body.page-Main_Page .content-box:focus {
  outline-color: #5ea0ff !important;
}

.skin-theme-clientpref-night body.page-Main_Page .content-box h2 {
  border-bottom-color: #b94a4a !important;
  color: #ffffff !important;
}

.skin-theme-clientpref-night body.page-Main_Page .content-box p {
  color: #cccccc !important;
}