【发布时间】:2015-04-11 02:03:07
【问题描述】:
我正在使用引导程序来实现表格行的悬停效果。但是我想在选择表格行时删除悬停效果。 I set a class (select-row) using JavaScript when a row is selected.似乎不适合我。我在 css 中使用 not 子句。
我的 CSS:
.table-hover > tbody > tr:not(.select-row):hover > td,
.table-hover > tbody > tr:not(.select-row):hover > th {
background-color: #f5fafe;
color: black;
}
tr.select-row {
background-color: #bddef9;
}
HTML:
<table class="table table-condensed table-hover">
<tr>
<td>xxx</td>
<td>xxx</td>
</tr>
</table>
【问题讨论】:
标签: html css twitter-bootstrap