From a09022c9521a0e8a429345fd98f22d3094a41c65 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Mon, 5 Aug 2019 19:01:42 +0800 Subject: [PATCH] fix: timeline_left/alternate tail&content --- components/timeline/style/index.less | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/components/timeline/style/index.less b/components/timeline/style/index.less index c829a2a171..97b3875c50 100644 --- a/components/timeline/style/index.less +++ b/components/timeline/style/index.less @@ -112,18 +112,16 @@ &-left { .@{timeline-prefix-cls}-item-content { - left: 50%; - width: 50%; + left: calc(50% - 4px); + width: calc(50% - 14px); text-align: left; } } &-right { .@{timeline-prefix-cls}-item-content { - right: 50%; - left: -30px; - width: 50%; - margin-right: 18px; + width: calc(50% - 14px); + margin: 0; text-align: right; } } @@ -135,12 +133,10 @@ .@{timeline-prefix-cls}-item-tail, .@{timeline-prefix-cls}-item-head, .@{timeline-prefix-cls}-item-head-custom { - left: 100%; + left: calc(100% - 4px - @timeline-width); } .@{timeline-prefix-cls}-item-content { - right: 0; - left: -30px; - width: 100%; + width: calc(100% - 18px); } } }