修改方案一:

参考: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图一样比较难控制,类似这样:开关打开,白色部分超出显示,各种问题

微信小程序switch样式调整

 

 

修改方案二:

用zoom属性修改 ,zoom的值越大,switch越大   1是原大小,1-0.1成倍缩小    1-...   成倍放大    可以自己试试,找个适合的尺寸

switch_default_address {

zoom: .4;

}

 

 

相关文章:

  • 2022-12-23
  • 2022-02-11
  • 2022-02-09
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-03
  • 2021-10-25
  • 2022-01-18
  • 2022-12-23
  • 2021-11-17
  • 2021-12-01
  • 2022-12-23
相关资源
相似解决方案