Html
    Css
    Js

    
                        
.checkLabel {
	font-size:16px;
	cursor:pointer;
}
.checkLabel i {
	font-size:16px;
	font-style:normal;
	display:inline-block;
	width:16px;
	height:16px; 
	text-align:center;
	line-height:16px;
	color:rgba(255,255,255,0);
	vertical-align:middle;
	margin:-2px 2px 1px 0px;
	border:#2489c5 1px solid;
	border-radius:50%; 
}
.checkLabel input[type="checkbox"],input[type="radio"] {
	display:none;
}
.checkLabel input[type="checkbox"]:checked+i,input[type="radio"]:checked+i {
	background:#2489c5;
	color:rgba(255,255,255,1);
}
.checkLabel input[type="checkbox"]:disabled+i,input[type="radio"]:disabled+i {
	border-color:#ccc;
}
.checkLabel input[type="checkbox"]:checked:disabled+i,input[type="radio"]:checked:disabled+i {
	background:#ccc;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

纯css自定义仿单选框 多选框

更新时间:2020-04-02 14:34:10

0