From 1c2c93fa81fac26485cdd5dfd1370607a3d7f89b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Mon, 20 Feb 2017 10:30:24 +0800 Subject: [PATCH] fix: show muliple messages in vertical direction, close #3543 (#4939) --- components/message/style/index.less | 33 +++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/components/message/style/index.less b/components/message/style/index.less index 71d9ba5890..181e8d29f5 100644 --- a/components/message/style/index.less +++ b/components/message/style/index.less @@ -9,22 +9,23 @@ width: 100%; top: 16px; left: 0; + pointer-events: none; &-notice { - width: auto; - vertical-align: middle; - position: absolute; - left: 50%; + padding: 8px; + text-align: center; + &:first-child { + margin-top: -8px; + } } &-notice-content { - position: relative; - right: 50%; padding: 8px 16px; border-radius: @border-radius-base; box-shadow: @shadow-2; background: @component-background; - display: block; + display: inline-block; + pointer-events: all; } &-success .@{iconfont-css-prefix} { @@ -50,4 +51,22 @@ top: 1px; position: relative; } + + &-notice.move-up-leave.move-up-leave-active { + animation-name: MessageMoveOut; + overflow: hidden; + } +} + +@keyframes MessageMoveOut { + 0% { + opacity: 1; + max-height: 60px; + padding: 8px; + } + 100% { + opacity: 0; + max-height: 0; + padding: 0; + } }