IE 11和mozila复选框不起作用

时间:2018-03-02 16:09:28

标签: html css

<input class="regular-checkbox ucheckbox" type="checkbox">

result

<input name="atnc" class="regular-checkbox" id="addtnchchk" type="checkbox">

this is a example for working box

    .regular-checkbox{
  -webkit-appearance: none;
  background-color: white;
  border:1px solid #cbd6e2;
  padding: 10px;
  border-radius: 3px;
  width: 20px;
  height: 20px;
  position: relative;
}

.regular-checkbox:active, .regular-checkbox:focus{
    box-shadow: 0px 0px 7px #00b0f0;
    border:1px solid #00b0f0;
}

.regular-checkbox:checked {
  background-color: #00b0f0;
  border:1px solid #00b0f0;
  color: white;
}
.regular-checkbox:focus{
  outline:0 !important;
  outline-offset: 0 !important;
}
.regular-checkbox:checked:after {
  font:normal normal normal 14px/1 FontAwesome;
  content: '\f00c';
  font-size: 15px;
  position: absolute;
  top: 3px;
  left: 2px;
  color: white;
}

为什么网站上的所有复选框都可以工作,但这个问题在mozila上也没有同样的问题? chrome工作得很好!

1 个答案:

答案 0 :(得分:0)

对不起家伙我刚发现错误!我的所有工作复选框都在<span></span>,而其他无效的复选框在<button></button>

IE和FF浏览器认为它类似于单击按钮而不是复选框。但在Chrome上工作正常.. !!!感谢您的时间和关注!