作者:回忆回忆194567 | 来源:互联网 | 2023-02-01 14:54
.wxml代码 默认样式 修改后样式
.wxss代码
.wx-switch-input{
/* 按钮的背景大小*/
width: 80rpx !important;
height: 40rpx !important;
background: #0C2648 !important;
border: #0C2648 !important;
}
/*白色样式(false的样式)*/
.wx-switch-input::before{
/* 按钮的背景大小 */
width: 80rpx !important;
height: 40rpx !important;
/* Switch的阴影效果 */
box-shadow: 0px 2px 14px 0px rgba(0, 0, 0, 0.5);
}
/* 中间的小圆球 */
/*绿色样式(true的样式)*/
.wx-switch-input::after{
width: 40rpx !important;
height: 40rpx !important;
}