【发布时间】:2014-07-07 02:17:09
【问题描述】:
我有一张带有 Twitter Bootstrap css 文件的表格。 该表定义如下:
<table class="table table-striped table-bordered table-hover">
...
</table>
使用 jQuery,我在表格行中的按钮上的单击事件之后添加了一个名为“.red-background”的类。
.red-background
{
background-color: red !important;
color: white !important;
}
问题是代码在对行上运行良好,但在奇数行上却不行! 我不知道为什么,但删除表的类“table-striped”和“table-hover”,一切正常。 “红色背景”类中定义的“颜色”规则一直有效,但奇数行上的“背景颜色”无效。
【问题讨论】:
-
你能分享一下小提琴吗??
-
添加一个jsfiddle,我们可以帮助你
-
我无法共享 Jsfiddle,因为我有很多本地 css 文件链接!
标签: jquery css twitter-bootstrap twitter-bootstrap-3 background-color