MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
删除的内容 添加的内容
还原 标签:手工回退 |
1 |
||
| 第14行: | 第14行: | ||
flex-direction: column; |
flex-direction: column; |
||
justify-content: center; |
justify-content: center; |
||
align-items: center; |
align-items: center; |
||
background: linear-gradient( |
background: linear-gradient(135deg, #8B0000, #B22222); /* 改进对比度 */ |
||
color: white; |
color: white; |
||
font-weight: bold; |
font-weight: bold; |
||
border-radius: 12px; |
border-radius: 12px; |
||
padding: 12px 24px; |
padding: 12px 24px; |
||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); |
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); |
||
text-align: center; |
text-align: center; |
||
} |
} |
||
| 第26行: | 第26行: | ||
.banner-text { |
.banner-text { |
||
margin: 0; |
margin: 0; |
||
line-height: 1.4; |
line-height: 1.4; |
||
} |
} |
||
.banner .chinese-text { |
.banner .chinese-text { |
||
font-size: 24px; |
font-size: 24px; |
||
font-weight: 700; |
font-weight: 700; |
||
} |
} |
||
.banner .english-text { |
.banner .english-text { |
||
font-size: 16px; |
font-size: 16px; |
||
font-weight: 500; |
font-weight: 500; |
||
opacity: 0.9; |
opacity: 0.9; |
||
| 第68行: | 第68行: | ||
border-radius: 10px; |
border-radius: 10px; |
||
border: 1px solid #e0e0e0; |
border: 1px solid #e0e0e0; |
||
-webkit-transition: -webkit-transform 0.3s ease, box-shadow 0.3s ease; |
|||
transition: transform 0.3s ease, box-shadow 0.3s ease; |
transition: transform 0.3s ease, box-shadow 0.3s ease; |
||
will-change: transform; /* 性能优化 */ |
|||
backface-visibility: hidden; /* 性能优化 */ |
|||
} |
} |
||
.content-box:hover { |
.content-box:hover { |
||
-webkit-transform: translateY(-5px); |
|||
-moz-transform: translateY(-5px); |
|||
transform: translateY(-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:focus { |
|||
outline: 2px solid #0066cc; /* 可访问性改进 */ |
|||
outline-offset: 2px; |
|||
} |
} |
||
| 第104行: | 第114行: | ||
.flex-container { |
.flex-container { |
||
flex-direction: column; |
flex-direction: column; |
||
gap: 15px; /* 统一间距 */ |
|||
} |
} |
||
.flex-container .content-box { |
.flex-container .content-box { |
||
max-width: |
max-width: none; /* 移除限制 */ |
||
width: 100%; |
|||
margin-bottom: 0; /* 统一使用 gap */ |
|||
} |
} |
||
| 第114行: | 第126行: | ||
.banner .english-text { |
.banner .english-text { |
||
text-align: center; |
text-align: center; |
||
} |
|||
| ⚫ | |||
.banner .chinese-text { |
|||
| ⚫ | |||
} |
} |
||
| 第122行: | 第137行: | ||
} |
} |
||
/* |
/* 为减少动画的用户提供支持 */ |
||
@media (prefers-reduced-motion: reduce) { |
|||
.content-box { |
|||
-webkit-transition: none; |
|||
transition: none; |
|||
} |
|||
.content-box:hover { |
|||
-webkit-transform: none; |
|||
-moz-transform: none; |
|||
transform: none; |
|||
} |
|||
} |
|||
/* 全站重定向链接样式 */ |
|||
.mw-redirect { |
.mw-redirect { |
||
color: #008000 !important; /* 使用 hex 颜色值,提高优先级 */ |
|||
| ⚫ | |||
font-weight: 500; |
|||
} |
|||
/* 重定向链接悬停效果 */ |
|||
.mw-redirect:hover { |
|||
color: #006400 !important; |
|||
text-decoration: underline; |
|||
} |
|||
/* 导航框样式优化 */ |
|||
.navbox { |
|||
width: 100%; |
|||
border-collapse: collapse; |
|||
} |
|||
.navbox td { |
|||
padding: 8px 12px; |
|||
border: none; |
|||
} |
|||
.navbox a { |
|||
text-decoration: none; |
|||
| ⚫ | |||
} |
|||
.navbox a:hover { |
|||
text-decoration: underline; |
|||
} |
|||
/* 语言链接样式 */ |
|||
#p-lang ul { |
|||
list-style: none; |
|||
padding: 0; |
|||
margin: 10px 0; |
|||
} |
|||
#p-lang li { |
|||
display: inline-block; |
|||
margin-right: 10px; |
|||
} |
|||
/* 响应式表格 */ |
|||
@media (max-width: 480px) { |
|||
.navbox { |
|||
font-size: 14px; |
|||
} |
|||
.navbox td { |
|||
padding: 6px 8px; |
|||
display: block; |
|||
width: 100%; |
|||
box-sizing: border-box; |
|||
} |
|||
} |
} |
||
2025年10月10日 (五) 10:01的版本
/* 全局字体设置,覆盖东亚语言 */
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: auto;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: linear-gradient(135deg, #8B0000, #B22222); /* 改进对比度 */
color: white;
font-weight: bold;
border-radius: 12px;
padding: 12px 24px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
text-align: center;
}
.banner-text {
margin: 0;
line-height: 1.4;
}
.banner .chinese-text {
font-size: 24px;
font-weight: 700;
}
.banner .english-text {
font-size: 16px;
font-weight: 500;
opacity: 0.9;
}
/* 当屏幕宽度大于 768px(如平板和大屏幕设备) */
@media screen and (min-width: 768px) {
.banner .chinese-text {
font-size: 28px;
}
.banner .english-text {
font-size: 18px;
}
}
/* 当屏幕宽度小于 480px(如手机设备) */
@media screen and (max-width: 480px) {
.banner .chinese-text {
font-size: 20px;
}
.banner .english-text {
font-size: 14px;
}
}
/* 内容块样式 */
.content-box {
margin: 10px;
padding: 20px;
border-radius: 10px;
border: 1px solid #e0e0e0;
-webkit-transition: -webkit-transform 0.3s ease, box-shadow 0.3s ease;
transition: transform 0.3s ease, box-shadow 0.3s ease;
will-change: transform; /* 性能优化 */
backface-visibility: hidden; /* 性能优化 */
}
.content-box:hover {
-webkit-transform: translateY(-5px);
-moz-transform: translateY(-5px);
transform: translateY(-5px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.content-box:focus {
outline: 2px solid #0066cc; /* 可访问性改进 */
outline-offset: 2px;
}
.content-box h2 {
position: relative;
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 2px solid red;
}
.content-box p {
line-height: 1.6;
}
/* Flex 容器 */
.flex-container {
display: flex;
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;
gap: 15px; /* 统一间距 */
}
.flex-container .content-box {
max-width: none; /* 移除限制 */
width: 100%;
margin-bottom: 0; /* 统一使用 gap */
}
.banner .chinese-text,
.banner .english-text {
text-align: center;
}
.banner .chinese-text {
font-size: 20px;
}
.banner .english-text {
font-size: 14px;
}
}
/* 为减少动画的用户提供支持 */
@media (prefers-reduced-motion: reduce) {
.content-box {
-webkit-transition: none;
transition: none;
}
.content-box:hover {
-webkit-transform: none;
-moz-transform: none;
transform: none;
}
}
/* 全站重定向链接样式 */
.mw-redirect {
color: #008000 !important; /* 使用 hex 颜色值,提高优先级 */
font-weight: 500;
}
/* 重定向链接悬停效果 */
.mw-redirect:hover {
color: #006400 !important;
text-decoration: underline;
}
/* 导航框样式优化 */
.navbox {
width: 100%;
border-collapse: collapse;
}
.navbox td {
padding: 8px 12px;
border: none;
}
.navbox a {
text-decoration: none;
color: #0066cc;
}
.navbox a:hover {
text-decoration: underline;
}
/* 语言链接样式 */
#p-lang ul {
list-style: none;
padding: 0;
margin: 10px 0;
}
#p-lang li {
display: inline-block;
margin-right: 10px;
}
/* 响应式表格 */
@media (max-width: 480px) {
.navbox {
font-size: 14px;
}
.navbox td {
padding: 6px 8px;
display: block;
width: 100%;
box-sizing: border-box;
}
}