MediaWiki:Common.css:修订间差异
外观
无编辑摘要 标签:移动版编辑 移动版网页编辑 高级移动版编辑 |
无编辑摘要 标签:移动版编辑 移动版网页编辑 高级移动版编辑 |
||
| 第1行: | 第1行: | ||
/* 这里放置的CSS将应用于所有皮肤 */ | /* 这里放置的CSS将应用于所有皮肤 */ | ||
/* /* ===== | /* /* ===== 时间线整体样式 ===== */ | ||
.timeline { | .timeline { | ||
position: relative; | position: relative; | ||
| 第38行: | 第38行: | ||
} | } | ||
.timeline-item.right::after { left: -10px; } | .timeline-item.right::after { left: -10px; } | ||
/* ===== 卡片内部样式 ===== */ | |||
.timeline-content { | .timeline-content { | ||
padding: 20px | padding: 15px 20px; | ||
background-color: #f9f9f9; | background-color: #f9f9f9; | ||
border-radius: 6px; | border-radius: 6px; | ||
border: 1px solid #ddd; | border: 1px solid #ddd; | ||
box-shadow: 0 2px 4px rgba(0,0,0,0.1); | box-shadow: 0 2px 4px rgba(0,0,0,0.1); | ||
text-align: left !important; /* 强制文字左对齐 */ | |||
} | } | ||
/* ===== | /* ===== 折叠开关:强制 Flex 布局 ===== */ | ||
.timeline-toggle { | .timeline-toggle { | ||
display: flex !important; | |||
justify-content: space-between !important; /* 标题靠左,箭头靠右 */ | |||
align-items: flex-start !important; /* 顶部对齐,防掉落 */ | |||
text-align: left; | width: 100% !important; | ||
text-align: left !important; | |||
cursor: pointer; | cursor: pointer; | ||
font-weight: bold; | font-weight: bold; | ||
line-height: 1.5; | line-height: 1.5; | ||
box-sizing: border-box; | |||
} | } | ||
/* | /* 标题:占据剩余空间,且强制左对齐 */ | ||
.timeline-title { | .timeline-title { | ||
flex: 1; | |||
text-align: left !important; | |||
word-break: break-word; | |||
} | } | ||
/* | /* 箭头:绝不压缩,第一行对齐 */ | ||
.timeline-arrow { | .timeline-arrow { | ||
flex-shrink: 0; /* 严禁被挤扁或掉落 */ | |||
margin-left: 10px; | |||
margin-top: 2px; /* 微调使其与第一行文字居中 */ | |||
font-size: 0.9em; | font-size: 0.9em; | ||
} | } | ||
/* ===== | /* ===== 手机端专属硬核适配 ===== */ | ||
@media screen and (max-width: 600px) { | @media screen and (max-width: 600px) { | ||
/* | .timeline::after { left: 20px; } /* 竖线靠左 */ | ||
.timeline-item { | .timeline-item { | ||
padding-left: | width: 100% !important; | ||
left: 0 !important; | |||
padding-left: 40px !important; /* 给竖线留出空间 */ | |||
padding-right: 10px !important; | padding-right: 10px !important; | ||
} | } | ||
.timeline-item::after { | |||
left: 10px !important; | |||
right: auto !important; | |||
} | |||
.timeline-content { | .timeline-content { | ||
padding: 12px 15px !important; | padding: 12px 15px !important; | ||
} | } | ||
} | } | ||
2026年9月17日 (四) 16:57的版本
/* 这里放置的CSS将应用于所有皮肤 */
/* /* ===== 时间线整体样式 ===== */
.timeline {
position: relative;
max-width: 800px;
margin: 0 auto;
padding: 20px 0;
}
.timeline::after {
content: '';
position: absolute;
width: 4px;
background-color: #1B3A5C;
top: 0;
bottom: 0;
left: 50%;
margin-left: -2px;
}
.timeline-item {
padding: 10px 40px;
position: relative;
width: 50%;
box-sizing: border-box;
}
.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }
.timeline-item::after {
content: '';
position: absolute;
width: 20px;
height: 20px;
right: -10px;
background-color: #FFC107;
border: 4px solid #00E5FF;
top: 15px;
border-radius: 50%;
z-index: 1;
}
.timeline-item.right::after { left: -10px; }
/* ===== 卡片内部样式 ===== */
.timeline-content {
padding: 15px 20px;
background-color: #f9f9f9;
border-radius: 6px;
border: 1px solid #ddd;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
text-align: left !important; /* 强制文字左对齐 */
}
/* ===== 折叠开关:强制 Flex 布局 ===== */
.timeline-toggle {
display: flex !important;
justify-content: space-between !important; /* 标题靠左,箭头靠右 */
align-items: flex-start !important; /* 顶部对齐,防掉落 */
width: 100% !important;
text-align: left !important;
cursor: pointer;
font-weight: bold;
line-height: 1.5;
box-sizing: border-box;
}
/* 标题:占据剩余空间,且强制左对齐 */
.timeline-title {
flex: 1;
text-align: left !important;
word-break: break-word;
}
/* 箭头:绝不压缩,第一行对齐 */
.timeline-arrow {
flex-shrink: 0; /* 严禁被挤扁或掉落 */
margin-left: 10px;
margin-top: 2px; /* 微调使其与第一行文字居中 */
font-size: 0.9em;
}
/* ===== 手机端专属硬核适配 ===== */
@media screen and (max-width: 600px) {
.timeline::after { left: 20px; } /* 竖线靠左 */
.timeline-item {
width: 100% !important;
left: 0 !important;
padding-left: 40px !important; /* 给竖线留出空间 */
padding-right: 10px !important;
}
.timeline-item::after {
left: 10px !important;
right: auto !important;
}
.timeline-content {
padding: 12px 15px !important;
}
}