首页 > 技术文章 > 修改小程序checkbox样式

wang-xx 2019-08-23 17:24 原文

未选中时的样式
checkbox .wx-checkbox-input {
  border-radius: 50%;
  height: 30rpx;
  width: 30rpx;
  margin-top: -4rpx;
  border: 1rpx solid #ccc;
  background-color: #fff;
  overflow: hidden;
}

选中后的样式

checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
  border-radius: 50%;
  font-size: 28rpx;
  width: 50rpx;
  height: 50rpx;
  text-align: center;
  line-height: 50rpx;
}

 

推荐阅读