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

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
删除的内容 添加的内容
XP-jia留言 | 贡献
ds5
标签已被回退
Maintenance script留言 | 贡献
首页样式小幅优化(选择器收敛与中间断点)
 
(未显示2个用户的11个中间版本)
第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", sans-serif, "PingFang SC", "Hiragino Sans GB",
"Noto Sans KR", sans-serif, "PingFang SC", "Hiragino Sans GB",
"Microsoft YaHei", "WenQuanYi Micro Hei", "SimSun", "SimHei",
"Microsoft YaHei", "WenQuanYi Micro Hei", "SimSun", "SimHei",
"Songti SC", "KaiTi", "MingLiU", "PMingLiU", "Microsoft JhengHei", "Malgun Gothic";
"Songti SC", "KaiTi", "MingLiU", "PMingLiU", "Microsoft JhengHei", "Malgun Gothic";
background-color: #f8f9fa;
line-height: 1.6;
color: #333;
margin: 0;
padding: 0;
}
}


/* 2026-01-11: load Mainpage-specific styles from dedicated page */
/* ===========================
横幅标语样式 - 简约版
=========================== */
.banner {
background: #2c3e50;
color: white;
border-radius: 8px;
padding: 20px;
text-align: center;
margin: 20px 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.banner .chinese-text {
font-size: 24px;
font-weight: 600;
margin-bottom: 8px;
}


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


/* 重定向链接悬停效果 */
/* ===========================
.mw-redirect:hover {
基础内容块样式 - 简约版
color: #006400 !important;
=========================== */
text-decoration: underline;
.content-box {
margin: 12px 0;
padding: 20px;
border-radius: 8px;
background: white;
border: 1px solid #e1e5e9;
transition: all 0.2s ease;
}
}


/* 导航框样式迁移至 Template:Navbox/styles.css */
.content-box h2 {
font-size: 1.25rem;
font-weight: 600;
color: #2c3e50;
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 2px solid #ecf0f1;
}


/* 语言链接样式 */
.content-box p {
#p-lang ul {
color: #555;
font-size: 0.95rem;
list-style: none;
margin: 0 0 12px 0;
padding: 0;
margin: 10px 0;
}
}


#p-lang li {
.content-box:hover {
display: inline-block;
border-color: #bdc3c7;
margin-right: 10px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
}
/* 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;
.content-section {
background: linear-gradient(135deg, #8B0000, #B22222) !important; /* 改进对比度 */
margin: 20px 0;
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;
.wide-box {
line-height: 1.4 !important;
width: 100%;
box-sizing: border-box;
}
}


body.page-Main_Page .banner .chinese-text {
/* 双栏布局 */
font-size: 24px !important;
.two-column-section {
font-weight: 700 !important;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin: 20px 0;
}
}


body.page-Main_Page .banner .english-text {
/* 特色高亮区块 */
font-size: 16px !important;
.highlight-box {
font-weight: 500 !important;
background: #f8f9fa;
opacity: 0.9 !important;
border-left: 4px solid #2ecc71;
}
}


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


body.page-Main_Page .banner .english-text {
/* 导航列布局 */
font-size: 18px !important;
.nav-container {
}
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-top: 15px;
}
}


/* 当屏幕宽度小于 480px(如手机设备) */
.nav-column {
@media screen and (max-width: 480px) {
padding: 15px;
body.page-Main_Page .banner .chinese-text {
background: rgba(0,0,0,0.02);
font-size: 20px !important;
border-radius: 6px;
}
border: 1px solid #f1f2f6;
}


body.page-Main_Page .banner .english-text {
.nav-column strong {
font-size: 14px !important;
color: #2c3e50;
}
margin-bottom: 8px;
display: block;
font-size: 0.95rem;
}
}


/* 三栏内容 */
/* 内容块样式 */
.three-column-content {
body.page-Main_Page .content-box {
margin: 10px !important;
display: grid;
padding: 20px !important;
grid-template-columns: 1fr 1fr 1fr;
border-radius: 10px !important;
gap: 20px;
border: 1px solid #e0e0e0 !important;
text-align: center;
-webkit-transition: -webkit-transform 0.3s ease, box-shadow 0.3s ease !important;
margin-top: 15px;
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 {
.three-column-content > div {
-webkit-transform: translateY(-5px) !important;
padding: 15px;
-moz-transform: translateY(-5px) !important;
background: white;
transform: translateY(-5px) !important;
border-radius: 6px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18) !important;
border: 1px solid #e1e5e9;
transition: all 0.2s ease;
}
}


body.page-Main_Page .content-box:focus {
.three-column-content > div:hover {
outline: 2px solid #0066cc !important; /* 可访问性改进 */
border-color: #3498db;
outline-offset: 2px !important;
}
}


.three-column-content strong {
body.page-Main_Page .content-box h2 {
position: relative !important;
color: #2c3e50;
padding-bottom: 10px !important;
display: block;
margin-bottom: 8px;
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;
.two-column-content {
color: #666666 !important;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
margin-top: 15px;
}
}


/* Flex 容器 */
.two-column-content > div {
body.page-Main_Page .flex-container {
padding: 15px;
display: flex !important;
background: rgba(0,0,0,0.02);
justify-content: space-between !important;
border-radius: 6px;
border: 1px solid #f1f2f6;
gap: 20px !important;
flex-wrap: wrap !important;
}
}


body.page-Main_Page .flex-container .content-box {
.two-column-content strong {
color: #2c3e50;
flex: 1 !important;
min-width: 300px !important;
display: block;
max-width: 33.33% !important;
margin-bottom: 8px;
box-sizing: border-box !important;
}
}
/* 中等屏幕优化 */

@media (max-width: 900px) {
/* 站点链接 */
body.page-Main_Page .flex-container .content-box {
.site-links {
max-width: 50% !important;
display: grid;
}
grid-template-columns: 1fr 1fr 1fr;
gap: 15px;
margin-top: 15px;
text-align: center;
}
}


.site-links > div {
padding: 12px;
background: white;
border: 1px solid #e1e5e9;
border-radius: 6px;
transition: all 0.2s ease;
}


/* 移动端优化 */
.site-links > div:hover {
@media (max-width: 768px) {
border-color: #3498db;
body.page-Main_Page .flex-container {
}
flex-direction: column !important;
gap: 15px !important; /* 统一间距 */
}


body.page-Main_Page .flex-container .content-box {
.site-links strong {
max-width: 100% !important; /* 移除限制 */
color: #2c3e50;
width: 100% !important;
display: block;
margin-bottom: 6px;
margin-bottom: 0 !important; /* 统一使用 gap */
}
font-size: 0.9rem;
}


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;
.content-section.main-focus .content-box {
}
border-left: 4px solid #3498db;
background: #f8fbfd;
}


body.page-Main_Page .banner .english-text {
/* 思想与人文区域 */
font-size: 14px !important;
.two-column-section .content-box:nth-child(1) {
}
border-left: 4px solid #9b59b6;
}
}


/* 为减少动画的用户提供支持 */
/* 技术与工程区域 */
@media (prefers-reduced-motion: reduce) {
.two-column-section .content-box:nth-child(2) {
body.page-Main_Page .content-box {
border-left: 4px solid #e67e22;
-webkit-transition: none !important;
}
transition: none !important;
}


body.page-Main_Page .content-box:hover {
/* 学习与成长区域 */
-webkit-transform: none !important;
.two-column-section:nth-of-type(2) .content-box:nth-child(1) {
-moz-transform: none !important;
border-left: 4px solid #f39c12;
transform: none !important;
}
}
}


/* 暗色模式覆盖(Citizen: night) */
/* 竞赛与实践区域 */
.skin-theme-clientpref-night body.page-Main_Page .banner {
.two-column-section:nth-of-type(2) .content-box:nth-child(2) {
background: linear-gradient(135deg, #3a0c0c, #5a1a1a) !important;
border-left: 4px solid #c0392b;
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;
.content-box:nth-last-child(3) {
background-color: #1c1c1c !important;
border-left: 4px solid #34495e;
}
}


.skin-theme-clientpref-night body.page-Main_Page .content-box:hover {
/* 最近更新区域 */
box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5) !important;
.content-box:nth-last-child(2) {
border-left: 4px solid #e74c3c;
}
}


.skin-theme-clientpref-night body.page-Main_Page .content-box:focus {
/* 站点信息区域 */
outline-color: #5ea0ff !important;
.content-box:last-of-type {
border-left: 4px solid #7f8c8d;
}
}


.skin-theme-clientpref-night body.page-Main_Page .content-box h2 {
/* ===========================
border-bottom-color: #b94a4a !important;
导航框样式 - 简约版
color: #ffffff !important;
=========================== */
.navbox {
background: #f8f9fa;
border-radius: 6px;
padding: 12px;
margin: 12px 0;
border: 1px solid #e9ecef;
}
}


.skin-theme-clientpref-night body.page-Main_Page .content-box p {
.navbox a {
color: #2980b9;
color: #cccccc !important;
text-decoration: none;
transition: color 0.2s ease;
}

.navbox a:hover {
color: #1a5276;
text-decoration: underline;
}

/* ===========================
链接样式
=========================== */
.content-box a {
color: #2980b9;
text-decoration: none;
transition: color 0.2s ease;
}

.content-box a:hover {
color: #1a5276;
text-decoration: underline;
}

.mw-redirect {
color: #27ae60;
font-weight: 500;
}

/* ===========================
工具类
=========================== */
.text-center {
text-align: center;
}

.text-muted {
color: #6c757d;
}

.mb-0 {
margin-bottom: 0;
}

.mt-15 {
margin-top: 15px;
}

/* ===========================
响应式设计 - 简约版
=========================== */

/* 平板设备 */
@media screen and (max-width: 1024px) {
.two-column-section {
grid-template-columns: 1fr;
}
.nav-container,
.two-column-content {
grid-template-columns: 1fr;
}
.three-column-content,
.site-links {
grid-template-columns: 1fr 1fr;
}
}

/* 手机设备 */
@media screen and (max-width: 768px) {
.flex-container {
grid-template-columns: 1fr;
gap: 16px;
}

.content-box {
padding: 16px;
margin: 8px 0;
}

.banner {
padding: 16px;
margin: 16px 0;
}

.banner .chinese-text {
font-size: 20px;
}

.banner .english-text {
font-size: 14px;
}
.three-column-content,
.site-links {
grid-template-columns: 1fr;
}
.three-column-content > div,
.site-links > div {
margin-bottom: 10px;
}
.nav-column {
padding: 12px;
}
}

/* 小屏手机设备 */
@media screen and (max-width: 480px) {
.content-box {
padding: 14px;
}

.content-box h2 {
font-size: 1.1rem;
}

.banner .chinese-text {
font-size: 18px;
}
.nav-container,
.two-column-content,
.three-column-content,
.site-links {
grid-template-columns: 1fr;
gap: 12px;
}
.nav-column,
.two-column-content > div,
.three-column-content > div,
.site-links > div {
padding: 12px;
}
}

/* ===========================
打印样式
=========================== */
@media print {
.banner {
background: #fff !important;
color: #000 !important;
border: 1px solid #000;
}
.content-box {
border: 1px solid #000;
box-shadow: none !important;
}
.nav-column,
.two-column-content > div,
.three-column-content > div,
.site-links > div {
background: #fff !important;
border: 1px solid #ddd;
}
}
}

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;
}