How to change the checkbox style in uniapp

Step 1: Copy

This paragraph must be written in app.vue to take effect

	//设置圆角
	checkbox.round .wx-checkbox-input,
	checkbox.round .uni-checkbox-input {
		border-radius: 100upx;
	}
	 
	//设置背景色
	checkbox.red[checked] .wx-checkbox-input,
	checkbox.red.checked .uni-checkbox-input{
		background-color: #ffffff !important;   //背景
		border-color: #ffffff !important;   //边框
		color: #2681FB !important;   //对勾
	}

use:

Just give the class name to the checkbox This red is just the class name not the set red! Modify the style and change it in the above code

Guess you like

Origin blog.csdn.net/weixin_57607714/article/details/124177422