1 /* 未選中的 背景樣式 */ 2 checkbox .wx-checkbox-input{ 3 border-radius: 50%;/* 圓角 */ 4 width: 46rpx; /* 背景的寬 */ 5 height: 46rpx; /* 背景的高 */ 6 } 7 /* 選中后的 背景樣式 (紅色背景 無邊框 可根據UI需求自己修改) */ 8 checkbox .wx-checkbox-input.wx-checkbox-input-checked{ 9 border: 1rpx solid #FF783B; 10 background: #FF783B; 11 } 12 /* 選中后的 對勾樣式 (白色對勾 可根據UI需求自己修改) */ 13 checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{ 14 border-radius: 50%;/* 圓角 */ 15 width: 40rpx;/* 選中后對勾大小,不要超過背景的尺寸 */ 16 height: 40rpx;/* 選中后對勾大小,不要超過背景的尺寸 */ 17 line-height: 40rpx; 18 text-align: center; 19 font-size:30rpx; /* 對勾大小 30rpx */ 20 color:#fff; /* 對勾顏色 白色 */ 21 background: transparent; 22 transform:translate(-50%, -50%) scale(1); 23 -webkit-transform:translate(-50%, -50%) scale(1); 24 }
直接復制到樣式文件中即可,在網上查到的!