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

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
删除的内容 添加的内容
XP-jia留言 | 贡献
测试新版
XP-jia留言 | 贡献
测试移动端
第96行: 第96行:
}
}


/* 软件信息表格的整体样式 */
/* 软件信息主容器 */
.software-info {
.software-info {
display: flex;
width: auto; /* 自适应宽度,根据内容决定 */
flex-direction: column; /* 默认移动端纵向 */
border-collapse: collapse; /* 合并表格边框,避免多重边框 */
align-items: center; /* 居中对齐 */
gap: 10px; /* 每个分类块之间的间距 */
}
}


/* 软件信息分类(桌面端横向排列) */
/* LOGO 单元格样式 */
@media (min-width: 768px) {
.software-info-logo {
.software-info {
width: 300px; /* 设置LOGO区域宽度 */
height: 300px; /* 设置LOGO区域高度 */
flex-direction: row; /* 桌面端横向排列 */
text-align: center; /* 文字居中对齐 */
flex-wrap: wrap; /* 超出屏幕时换行 */
justify-content: center;
vertical-align: middle; /* 垂直居中对齐 */
}
}


.software-info-section {
/* 无 LOGO 时的占位内容样式 */
flex: 1; /* 让每个分类块等宽 */
.software-info-no-image {
display: flex; /* 使用flex布局,使内容居中 */
min-width: 200px; /* 避免内容太窄 */
}
justify-content: center; /* 水平居中对齐 */
align-items: center; /* 垂直居中对齐 */
width: 300px; /* 设置占位区宽度 */
height: 300px; /* 设置占位区高度 */
font-size: 14px; /* 字体大小 */
color: #888; /* 字体颜色,设置为淡灰色,确保内容不突兀 */
background-color: #f5f5f5; /* 背景色设置为淡灰色,突出显示占位内容 */
border: 1px dashed #ccc; /* 虚线边框,便于区分与其他内容 */
}
}


/* 表头单元(标题行)的样式 */
/* 表格样式 */
.software-info th {
.software-info-section table {
background: #f2f2f2; /* 背景颜色浅灰色,区分头与其他部分 */
width: 100%; /* 格填充类块 */
border-collapse: collapse;
text-align: left; /* 表头文字左对齐 */
padding: 8px; /* 增加内边距,提高可读性 */
}
}


/* 分类标题(合并行)样式,居中并带背景色 */
/* 分类标题 */
.software-info-category {
.software-info-section table caption {
font-weight: bold;
text-align: center; /* 文字居中对齐 */
text-align: center;
background: #e6e6e6; /* 背景色浅灰色 */
padding: 5px;
font-weight: bold; /* 加粗字体,使其作为类别标题更突出 */
}
}


/* 所有单元格样式 */
/* 单元格样式 */
.software-info th,
.software-info-section th,
.software-info td {
.software-info-section td {
border: 1px solid #ccc; /* 为单元格添加边框,颜色为浅灰色 */
border: 1px solid var(--mw-border-color);
padding: 8px; /* 增加内边距,使内容更清晰 */
padding: 8px;
}
}

2025年2月10日 (一) 09:23的版本

/* 全局字体设置,覆盖中文、日文、韩文等东亚语言 */
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";
}

/* 横幅标语样式 */
.banner {
  height: 100px; /* 高度设置为100px */
  display: flex; /* 使用Flexbox布局 */
  flex-direction: column; /* 子元素垂直排列 */
  justify-content: center; /* 垂直方向居中 */
  /* background-color: #ffffe0; 背景颜色设置为淡黄色 */
  color: #ff0000; /* 文字颜色设置为红色 */
  font-weight: bold; /* 字体加粗 */
  border-radius: 10px; /* 圆角 */
  padding: 0 20px; /* 内边距 */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影效果 */
}

.banner-text {
  margin: 0; /* 外边距设置为0 */
  line-height: 1.2; /* 行高 */
}

.banner .chinese-text {
  text-align: left; /* 左对齐 */
  font-size: 24px; /* 字体大小 */
}

.banner .english-text {
  text-align: right; /* 右对齐 */
  font-size: 16px; /* 字体大小 */
}

/* 内容块样式 */
.content-box {
  margin: 10px; /* 外边距 */
  padding: 20px; /* 内边距 */
  border-radius: 10px; /* 圆角 */
  /* background: linear-gradient(135deg, #ffffff, #f0f0f0); /* 渐变背景 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影效果 */
  border: 1px solid #e0e0e0; /* 边框 */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* 过渡效果 */
}

.content-box:hover {
  transform: translateY(-5px); /* 向上移动5px */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* 增强阴影效果 */
}

.content-box h2 {
  position: relative; /* 相对定位 */
  padding-bottom: 10px; /* 下内边距 */
  margin-bottom: 10px; /* 下外边距 */
  border-bottom: 2px solid #ff0000; /* 下边框 */
  color: #333; /* 字体颜色 */
}

.content-box p {
  line-height: 1.6; /* 行高 */
  color: #666; /* 字体颜色 */
}

/* Flex容器样式 */
.flex-container {
  display: flex; /* 使用Flexbox布局 */
  justify-content: space-between; /* 子元素均匀分布 */
  gap: 20px; /* 子元素间距 */
}

.flex-container .content-box {
  flex: 1; /* 伸缩性 */
  max-width: 33.33%; /* 最大宽度 */
  box-sizing: border-box; /* 包括内边距和边框在内计算宽度 */
}

/* 移动设备优化 */
@media (max-width: 768px) {
  .flex-container {
    flex-direction: column; /* 子元素垂直排列 */
  }

  .flex-container .content-box {
    max-width: 100%; /* 最大宽度 */
    margin-bottom: 20px; /* 下外边距 */
  }

  .banner .chinese-text, .banner .english-text {
    text-align: center; /* 居中对齐 */
    font-size: 18px; /* 字体大小 */
  }

  .banner .english-text {
    font-size: 14px; /* 字体大小 */
  }
}

/* 软件信息主容器 */
.software-info {
    display: flex;
    flex-direction: column; /* 默认移动端纵向 */
    align-items: center; /* 居中对齐 */
    gap: 10px; /* 每个分类块之间的间距 */
}

/* 软件信息分类(桌面端横向排列) */
@media (min-width: 768px) {
    .software-info {
        flex-direction: row; /* 桌面端横向排列 */
        flex-wrap: wrap; /* 超出屏幕时换行 */
        justify-content: center;
    }

    .software-info-section {
        flex: 1; /* 让每个分类块等宽 */
        min-width: 200px; /* 避免内容太窄 */
    }
}

/* 表格样式 */
.software-info-section table {
    width: 100%; /* 让表格填充分类块 */
    border-collapse: collapse;
}

/* 分类标题 */
.software-info-section table caption {
    font-weight: bold;
    text-align: center;
    padding: 5px;
}

/* 单元格样式 */
.software-info-section th, 
.software-info-section td {
    border: 1px solid var(--mw-border-color);
    padding: 8px;
}