[optimize & bug fix] Button: 优化layer, 修复滚动时, gpu占用过高情况 (#336)

* 优化button的layer

* [optimize] Button: 把z-index:0; 位置调整
This commit is contained in:
DeepKolos 2017-11-22 11:52:39 +08:00 committed by neverland
parent 83f9654681
commit a6a59e6bc7
2 changed files with 5 additions and 1 deletions

View File

@ -24,7 +24,7 @@
border-color: $black;
background-color: $black;
border-radius: inherit;/* inherit parent's border radius */
transform: translate3d(-50%, -50%, 0);
transform: translate(-50%, -50%);
}
&:not([disabled]):active::before {

View File

@ -12,6 +12,8 @@
.van-loading {
font-size: 0;
line-height: 0;
z-index: 0;
position: relative;
&--circle {
width: 16px;
@ -28,6 +30,8 @@
&__spinner {
width: 100%;
height: 100%;
position: relative;
z-index: -1;
display: inline-block;
animation: van-loading 0.8s linear infinite;