直接在wxss文件的前面加下面的內容:
/*swtich樣式-start*/
/*swtich整體大小*/
.wx-switch-input{
width:82rpx !important;
height:40rpx !important;
margin:0 !important;
padding: 0 !important;
}
/*白色樣式(false的樣式)*/
.wx-switch-input::before{
width:80rpx !important;
height:36rpx !important;
}
/*綠色樣式(true的樣式)*/
.wx-switch-input::after{
width:38rpx !important;
height:36rpx !important;
}
/*swtich樣式end*/
只能說,小程序這些原生組件 真的是個奇葩。。。那么大個按鈕,開發者自己不覺得難看么
