当前位置:Gxlcms > html代码 > css自定义checkbox之<label><input>纠葛_html/css_WEB-ITnose

css自定义checkbox之<label><input>纠葛_html/css_WEB-ITnose

时间:2021-07-01 10:21:17 帮助过:9人阅读

来CSDN的处女问呢:
故事起因于我要单纯地用css自定义一个checkbox的样式,然后我是这样做的:

input[type="checkbox"]{opacity:0;}input[type="checkbox"] + label:before{background:#d5d5d5;      content:"";      height: 15px;      width: 15px;      position: absolute;      top: 0;      left: 0;  }

以上方法我是效仿iCheck插件写的。BUT导师说我的方法不行啊(摔!)
他说:id 滥用会导致日后id重名排查困难,让我用把包裹在

人气教程排行