如何覆盖引导复选框样式

时间:2015-07-29 01:56:06

标签: html css twitter-bootstrap-3

我买了一个bootstrap模板,样式表文件,有这个代码:

input[type=checkbox],
input[type=radio] {
  opacity: 0;
  position: absolute;
  left: -9999px;
  z-index: 12;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

我有一个html表,其中有一个带复选框的单元格,没有显示,使用chrome检查器,我修改了关闭样式属性,

我的问题是否有任何方法可以告诉我的代码不要在表格单元格内的复选框中应用该样式?

感谢 阿尔贝托

2 个答案:

答案 0 :(得分:2)

是的,请专门拨打该复选框,将class添加到checkbox这样的内容<input type="checkbox" class="unique-class"/>然后在您的css中添加样式checkbox

input.unique-class[type=checkbox],
input.unique-class[type=radio] {
/*stuff here*/
}

答案 1 :(得分:-1)

  input[type="radio"], input[type="checkbox"] {
    /*stuff here*/
    cursor:pointer;
  } 
相关问题