From 0320e679138ae6105e44667dc234784f6c01e28c Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 5 Jan 2022 22:08:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=E4=B8=80?= =?UTF-8?q?=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/input/checkbox.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index abdd7b761..47d6e1088 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -8,8 +8,9 @@ &:after { position: absolute; display: table; - top: 50%; - left: 20%; + // 百分比会出现像素误差 + top: 6px; + left: 2px; border: 2px solid transparent; border-top: 0; border-left: 0; From a0c6143476a6c4f57bc08834bd6df14347905bac Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 5 Jan 2022 22:27:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E5=8A=A8=E7=94=BB=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/input/checkbox.less | 5 ++++- src/less/base/single/input/radio.less | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index 47d6e1088..9bf8f3542 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -4,7 +4,8 @@ & .checkbox-content, &.checkbox-content { .border-radius(2px); border: 1px solid @color-bi-border-checkbox; - box-sizing: border-box; + .box-sizing(border-box); + .transition(all .1s); &:after { position: absolute; display: table; @@ -18,6 +19,8 @@ height: 9px; .box-sizing(border-box); .transform(rotate(45deg) scale(1) translate(-50%, -50%)); + @transition: all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s; + .transition(@transition); content: ''; } &.hover, &:hover { diff --git a/src/less/base/single/input/radio.less b/src/less/base/single/input/radio.less index 6fb3008c3..334569278 100644 --- a/src/less/base/single/input/radio.less +++ b/src/less/base/single/input/radio.less @@ -5,6 +5,7 @@ .border-radius(8px); border: 1px solid @color-bi-border-radio; .box-sizing(border-box); + .transition(all .1s); &:after { content: ""; } @@ -25,6 +26,8 @@ .border-radius(3px); background-color: @color-bi-background-radio; .transform(translate(-50%, -50%)); + @transition: all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s; + .transition(@transition); } } }