微信小程序switch样式调整
时间:2019-12-26 13:21:04
收藏:0
阅读:1117
修改方案一:
参考:https://blog.csdn.net/littlebeargreat/article/details/79130305
/*swtich整体大小*/ .wx-switch-input{ width:82rpx !important; height:40rpx !important; } /*白色样式(false的样式)*/ .wx-switch-input::before{ width:80rpx !important; height: 36rpx !important; } /*绿色样式(true的样式)*/ .wx-switch-input::after{ width: 40rpx !important; height: 36rpx !important; }
修改成功,如果要完全调整和Ui图一样比较难控制,类似这样:开关打开,白色部分超出显示,各种问题
修改方案二:
用zoom属性修改 ,zoom的值越大,switch越大 1是原大小,1-0.1成倍缩小 1-... 成倍放大 可以自己试试,找个适合的尺寸
switch_default_address {
zoom: .4;
}
原文:https://www.cnblogs.com/zmdComeOn/p/12101433.html
评论(0)