From 5b1005e2430a0dc972df549acdcb8796033b1e9e Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 21 Mar 2016 18:53:57 +0800 Subject: [PATCH] improve radio animation --- style/components/radio.less | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/style/components/radio.less b/style/components/radio.less index d90e3aa81f..7dc3a9f686 100644 --- a/style/components/radio.less +++ b/style/components/radio.less @@ -1,7 +1,7 @@ @radio-group-prefix-cls: ant-radio-group; @radio-prefix-cls: ant-radio; @radio-inner-prefix-cls: ~"@{radio-prefix-cls}-inner"; -@radio-duration: .3s; +@radio-duration: .2s; .@{radio-group-prefix-cls} { display: inline-block; @@ -38,7 +38,8 @@ content: ' '; background-color: @primary-color; opacity: 0; - transition: transform @radio-duration @ease-in-out-circ, opacity @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ; + transform: scale(0); + transition: all @radio-duration @ease-in-out-circ; } position: relative; @@ -52,7 +53,7 @@ border-radius: 14px; border-color: @border-color-base; background-color: #fff; - transition: border-color @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ; + transition: all @radio-duration @ease-in-out-circ; } &-input { @@ -74,7 +75,7 @@ &:after { transform: scale(1); opacity: 1; - transition: transform @radio-duration @ease-out-back, opacity @radio-duration @ease-in-out-circ, background-color @radio-duration @ease-in-out-circ; + transition: all @radio-duration @ease-in-out-circ; } } }