MediaWiki:Common.css:修订间差异
外观
创建页面,内容为“→这里放置的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; wid…” 标签:移动版编辑 移动版网页编辑 高级移动版编辑 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* 这里放置的CSS将应用于所有皮肤 */ | /* 这里放置的CSS将应用于所有皮肤 */ | ||
/* | /* /* ===== 垂直时间线基础样式 ===== */ | ||
.timeline { | .timeline { | ||
position: relative; | position: relative; | ||
| 第7行: | 第7行: | ||
padding: 20px 0; | padding: 20px 0; | ||
} | } | ||
.timeline::after { | .timeline::after { | ||
content: ''; | content: ''; | ||
| 第18行: | 第17行: | ||
margin-left: -2px; | margin-left: -2px; | ||
} | } | ||
.timeline-item { | .timeline-item { | ||
padding: 10px 40px; | padding: 10px 40px; | ||
| 第27行: | 第25行: | ||
.timeline-item.left { left: 0; } | .timeline-item.left { left: 0; } | ||
.timeline-item.right { left: 50%; } | .timeline-item.right { left: 50%; } | ||
.timeline-item::after { | .timeline-item::after { | ||
content: ''; | content: ''; | ||
| 第41行: | 第38行: | ||
} | } | ||
.timeline-item.right::after { left: -10px; } | .timeline-item.right::after { left: -10px; } | ||
.timeline-content { | .timeline-content { | ||
padding: 20px 30px; | padding: 20px 30px; | ||
| 第49行: | 第45行: | ||
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); | ||
} | |||
/* ===== 手机端适配:单列显示 ===== */ | |||
@media screen and (max-width: 600px) { | |||
.timeline::after { | |||
left: 31px; /* 竖线靠左 */ | |||
} | |||
.timeline-item { | |||
width: 100%; | |||
padding-left: 70px; | |||
padding-right: 25px; | |||
} | |||
.timeline-item.left, | |||
.timeline-item.right { | |||
left: 0; /* 所有卡片左对齐 */ | |||
} | |||
.timeline-item::after { | |||
left: 15px; /* 圆点靠左 */ | |||
right: auto; | |||
} | |||
.timeline-item.right::after { | |||
left: 15px; | |||
} | |||
} | |||
/* ===== 折叠开关样式(可选) ===== */ | |||
.timeline-toggle { | |||
cursor: pointer; | |||
font-weight: bold; | |||
color: #1B3A5C; | |||
display: inline-block; | |||
} | |||
.timeline-toggle:hover { | |||
color: #00E5FF; | |||
} | } | ||
2026年9月15日 (二) 16:32的版本
/* 这里放置的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: 20px 30px;
background-color: #f9f9f9;
position: relative;
border-radius: 6px;
border: 1px solid #ddd;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* ===== 手机端适配:单列显示 ===== */
@media screen and (max-width: 600px) {
.timeline::after {
left: 31px; /* 竖线靠左 */
}
.timeline-item {
width: 100%;
padding-left: 70px;
padding-right: 25px;
}
.timeline-item.left,
.timeline-item.right {
left: 0; /* 所有卡片左对齐 */
}
.timeline-item::after {
left: 15px; /* 圆点靠左 */
right: auto;
}
.timeline-item.right::after {
left: 15px;
}
}
/* ===== 折叠开关样式(可选) ===== */
.timeline-toggle {
cursor: pointer;
font-weight: bold;
color: #1B3A5C;
display: inline-block;
}
.timeline-toggle:hover {
color: #00E5FF;
}