MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
删除的内容 添加的内容
LOGO 单元格始终保持 300×300px 大小,并确保 插入的图片水平 & 垂直居中 |
小 制表符 |
||
| 第118行: | 第118行: | ||
max-height: 100%; |
max-height: 100%; |
||
object-fit: contain; /* 确保图片按比例缩放 */ |
object-fit: contain; /* 确保图片按比例缩放 */ |
||
} |
|||
/* 无 LOGO 时的占位文字 */ |
|||
.software-info-no-image { |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
width: 100%; |
|||
height: 100%; |
|||
font-size: 14px; |
|||
color: #888; /* 设定一个淡灰色,使其不突兀 */ |
|||
white-space: nowrap; /* 避免换行 */ |
|||
} |
} |
||
2025年2月9日 (日) 09:47的版本
/* 全局字体设置,覆盖中文、日文、韩文等东亚语言 */
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; /* 字体大小 */
}
}
/* 软件信息表格 - LOGO 区域 */
.software-info-logo {
width: 300px; /* LOGO 单元格宽度 */
height: 300px; /* LOGO 单元格高度 */
text-align: center; /* 水平居中 */
vertical-align: middle; /* 垂直居中 */
}
/* 容器用于 LOGO 图片的居中显示 */
.software-info-logo-container {
display: flex; /* 启用 Flexbox */
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
width: 100%;
height: 100%;
}
/* LOGO 图片 - 限制最大宽高,防止变形 */
.software-info-logo-container img {
max-width: 100%;
max-height: 100%;
object-fit: contain; /* 确保图片按比例缩放 */
}
/* 无 LOGO 时的占位文字 */
.software-info-no-image {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
font-size: 14px;
color: #888; /* 设定一个淡灰色,使其不突兀 */
white-space: nowrap; /* 避免换行 */
}