自定义样式的checkbox, radio

Posted 清风叶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自定义样式的checkbox, radio相关的知识,希望对你有一定的参考价值。

<div class="checkbox">

  <label>

    <input type="checkbox"/>

    选择框

  </label>

</div>

 

.checkbox {

  position: relative;

  cursor: pointer;

}

.checkbox input {

  opacity: 0;

}

.checkbox:before {

  content: "";

  display: block;

  position: absolute;

  width: 20px;

  height: 100%;

  background: url(xxx);

}

以上是关于自定义样式的checkbox, radio的主要内容,如果未能解决你的问题,请参考以下文章