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

MediaWiki:Common.css:修订间差异

MediaWiki界面页面
删除的内容 添加的内容
XP-jia留言 | 贡献
撤销XP-jia讨论)的修订版本494
标签撤销
XP-jia留言 | 贡献
测试
第1行: 第1行:
/* 全局字体设置,覆盖中文、日文、韩文等东亚语言 */
/* 全局字体设置,覆盖东亚语言 */
body {
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";
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 {
.banner {
height: 100px; /* 高度设置为100px */
height: 100px;
display: flex; /* 使用Flexbox布局 */
display: flex;
flex-direction: column; /* 子元素垂直排列 */
flex-direction: column;
justify-content: center; /* 垂直方向居中 */
justify-content: center;
color: red;
color: #ff0000; /* 文字颜色设置为红色 */
font-weight: bold; /* 字体加粗 */
font-weight: bold;
border-radius: 10px; /* 圆角 */
border-radius: 10px;
padding: 0 20px; /* 内边距 */
padding: 0 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 阴影效果 */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
}


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


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


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


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


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


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


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


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


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


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


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


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


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