微信开发文档中,switch能修改颜色,没有直接修改switch大小的属性。用一般控件height & width来修改宽高是没有用的。

 

使用如下方法:

在.wxss文件:

.wx-switch-input {
  width: 42px !important;
  height: 20px !important;
}

.wx-switch-input::before {
  width: 41px !important;
  height: 20px !important;
}

.wx-switch-input::after {
  width: 18px !important;
  height: 18px !important;
}

 

相关文章:

  • 2022-12-23
  • 2021-06-28
  • 2021-05-28
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-16
  • 2022-02-11
  • 2021-07-25
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
相关资源
相似解决方案