默认.active
和:hover
状态以及上下文的变体可以发现起点在Bootstrap 3 CSS文件中的第2337行(如果我没有弄错)。
你会发现它是.table > thead > tr > td.active
和其他(下面)是其他上下文变体(成功,信息等),那么这是编辑背景颜色的正确位置。
CSS默认.active
状态:
.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tfoot > tr > td.active,
.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > tbody > tr.active > td,
.table > tfoot > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > th {
background-color /* background color for default .active state */
}
CSS默认.active:hover
状态:
.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
background-color /* background color for default .active:hover state */
}
你只需要更换.active
与上下文变种(成功,信息等)或者你自己想要的变种,那么它会变成类似.table > thead > tr > td.variant
。
或者如果您知道如何使用Less,那么它会容易很多 因为它已经包含在它们的源代码中。该文件在mixins文件夹内命名为 table-row.less
。
尝试用td替换tr,并在此css选择器中删除.bg-info。 – Damiano
您应该编写完整的代码html以及css.please提供这个问题的提示 – mean