繁体   English   中英

如何覆盖引导复选框样式

[英]How to override bootstrap checkbox style

我购买了一个引导模板(样式表文件),其代码如下:

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

我有一个html表,其中包含一个带有复选框的单元格,但未显示出来,使用chrome inspector,我修改了关闭样式属性的功能,

我的问题有什么办法可以告诉我的代码不要在表格单元格内的复选框中应用该样式?

谢谢阿尔贝托

是的,专门调用该复选框,将一个class添加到此checkbox ,例如<input type="checkbox" class="unique-class"/>然后在CSS中将样式添加到该checkbox ,如下所示:

input.unique-class[type=checkbox],
input.unique-class[type=radio] {
/*stuff here*/
}
  input[type="radio"], input[type="checkbox"] {
    /*stuff here*/
    cursor:pointer;
  } 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM