仿互站小程序
This commit is contained in:
45
vant/switch/index.wxss
Normal file
45
vant/switch/index.wxss
Normal file
@@ -0,0 +1,45 @@
|
||||
@import "../area/index.wxss";
|
||||
|
||||
.van-switch {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 2em;
|
||||
border: 1px solid rgba(0,0,0,.1);
|
||||
border-radius: 1em;
|
||||
box-sizing: initial;
|
||||
transition: background-color .3s;
|
||||
}
|
||||
|
||||
.van-switch,.van-switch__node {
|
||||
height: 1em;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.van-switch__node {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
border-radius: 100%;
|
||||
width: 1em;
|
||||
z-index: 1;
|
||||
transition: .3s;
|
||||
box-shadow: 0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);
|
||||
}
|
||||
|
||||
.van-switch__loading {
|
||||
top: 25%;
|
||||
left: 25%;
|
||||
position: absolute!important;
|
||||
}
|
||||
|
||||
.van-switch--on {
|
||||
background-color: #1989fa;
|
||||
}
|
||||
|
||||
.van-switch--on .van-switch__node {
|
||||
transform: translateX(1em);
|
||||
}
|
||||
|
||||
.van-switch--disabled {
|
||||
opacity: .4;
|
||||
}
|
Reference in New Issue
Block a user