Html
    Css
    Js

    
                        
body {
	font:14px/150% microsoft yahei,tahoma;
}
.MyInputStyle input {
	display:none;
}
.MyInputStyle label {
	border:1px solid #CCC;
	color:#666;
	padding:2px 10px 2px 5px;
	line-height:28px;
	min-width:80px;
	text-align:center;
	float:left;
	margin:2px;
	border-radius:4px
}
.MyInputStyle input:checked + label {
	background:url(http://www.jq22.com/tp/6371991344824159314077933.png) no-repeat right bottom;
	//图片不知怎么上传,请谅解
	border:1px solid #00a4ff;
	background-size:21px 21px;
	color:#00a4ff
}
.MyInputStyle input:disabled + label {
	opacity:0.7;
}

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

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

更新时间:2020-03-15 23:58:47

0