From 9d7417b386e4e8135c0e7f3e39b9e33c0a880b68 Mon Sep 17 00:00:00 2001 From: kang <907747874@qq.com> Date: Wed, 27 Sep 2017 18:11:16 +0800 Subject: [PATCH] fix button actived 1px blank --- packages/vant-css/src/button.css | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/vant-css/src/button.css b/packages/vant-css/src/button.css index 8416fa779..1fd62f0e8 100644 --- a/packages/vant-css/src/button.css +++ b/packages/vant-css/src/button.css @@ -15,13 +15,16 @@ &::before { content: " "; position: absolute; - top: -1px; - left: -1px; - right: -1px; - bottom: -1px; + top: 50%; + left: 50%; opacity: 0; - background-color: $black; - border-radius: inherit; /* inherit parent's border radius */ + width: 100%; + height: 100%; + border: inherit; + border-color: #000; + background-color: #000; + border-radius: inherit;/* inherit parent's border radius */ + transform: translate3d(-50%, -50%, 0); } &:not([disabled]):active::before {