uniappでチェックボックスのスタイルを変更する方法

ステップ1:コピー

この段落を有効にするには、app.vueに記述する必要があります

	//设置圆角
	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;   //对勾
	}

使用する:

チェックボックスにクラス名を付けるだけですこの赤は、設定された赤ではなく、単なるクラス名です!スタイルを変更し、上記のコードで変更します

おすすめ

転載: blog.csdn.net/weixin_57607714/article/details/124177422