Skip to content

Commit 3102a10

Browse files
committed
style: 修复样式问题
1 parent cf0da34 commit 3102a10

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

packages/ccui/ui/timeline/src/timeline.scss

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,45 @@
1414
}
1515

1616
// 垂直居中的时间线项目
17-
.ccui-timeline-item__center {
17+
.ccui-timeline-item.ccui-timeline-item__center {
1818
display: flex;
1919
align-items: center;
20+
min-height: 60px;
2021

2122
.ccui-timeline-item__wrapper {
2223
width: 100%;
2324
}
2425

2526
.ccui-timeline-item__tail {
26-
top: 0;
27+
top: 6px;
28+
height: calc(100% + 14px);
29+
}
30+
31+
.ccui-timeline-item__node {
32+
top: 50%;
33+
transform: translateY(-50%);
34+
}
35+
36+
.ccui-timeline-item__dot {
37+
top: 50%;
38+
transform: translateY(-50%);
2739
}
2840
}
2941

3042
// 第一个垂直居中项目的特殊处理
31-
.ccui-timeline-item__center:first-child {
43+
.ccui-timeline-item.ccui-timeline-item__center:first-child {
3244
.ccui-timeline-item__tail {
33-
height: calc(50% + 10px);
34-
top: calc(50% - 10px);
45+
top: 50%;
46+
height: calc(50% + 20px);
3547
}
3648
}
3749

3850
// 最后一个垂直居中项目的特殊处理
39-
.ccui-timeline-item__center:last-child {
51+
.ccui-timeline-item.ccui-timeline-item__center:last-child {
4052
.ccui-timeline-item__tail {
4153
display: block;
42-
height: calc(50% - 10px);
54+
height: 50%;
55+
top: 6px;
4356
}
4457
}
4558
}

0 commit comments

Comments
 (0)