MediaWiki:Common.css
注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* 这里放置的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);
}