修改微信小程序switch开关样式

转载及参考:https://blog.csdn.net/littlebeargreat/article/details/79130305

/*swtich整体大小及背景色*/
.wx-switch-input{
    width:82rpx !important;
    height:36rpx !important;
    background: #50D2C2 !important;
    border: #50d2c2 !important; /* 2018-07-18 重置开关边框颜色 */
}
/*白色样式(false的样式)*/
.wx-switch-input::before{
    width:80rpx !important;
    height: 36rpx !important;
}
/*绿色样式(true的样式)*/
.wx-switch-input::after{
    width: 40rpx !important;
    height: 36rpx !important;
}

修改前:
这里写图片描述

修改后:
这里写图片描述

猜你喜欢

转载自blog.csdn.net/qq_39108466/article/details/79932804