删除鼠标悬停效果
Remove mouse hover effect
当鼠标悬停在单元格上时,假设效果X发生。如何删除悬停效果?
JS小提琴
网页代码:
<table class="table table-striped table-bordered table-hover" cellspacing="0" width="100%">
<thead>
<tr>
<th>Key</th>
<th>Valeur version {{application.version}}</th>
<th></th>
<th>Valeur version {{applicationcible.version}}</th>
</tr>
</thead>
<tbody ng-repeat="group in groups">
<tr>
<td class="danger" colspan="4" ng-click="hideGroup = !hideGroup">
<a href="" ng-click="group.$hideRows = !group.$hideRows">
<span class="glyphicon" ng-class="{ 'glyphicon-chevron-right': group.$hideRows, 'glyphicon-chevron-down': !group.$hideRows }"></span>
<strong>{{group.name}}</strong>
</a>
</td>
</tr>
<tr ng-repeat-start="member in group.members" ng-hide="hideGroup">
<td rowspan="2">
{{ member.name }}
</td>
<td rowspan="2" ng-class="{selected: $index==selectedRowLeft}">{{ member.valueRef }}</td>
<td class="cube" >
<div ng-if="group.id != 1">
<button type="button" ng-click="moveLeft($index, group)" ><span class="glyphicon glyphicon-chevron-left"></span></button>
</div>
</td>
<td rowspan="2" ng-class="{selected: $index==selectedRowRight}">{{ member.valueCible }}</td>
</tr>
<tr ng-repeat-end ng-hide="hideGroup" >
<td class="cube" >
<div ng-if="group.id != 2">
<button type="button" ng-click="moveRight($index, group)"><span class="glyphicon glyphicon-chevron-right"></span></button>
</div>
</td>
</tr>
</tbody>
</table>
更新
我试过这个 CSS:
tbody tr:hover td.hasRowSpan {
background-color: none; /* or whatever color you want */
}
不幸的是,它不起作用。
Remove the class "table-hover" from the table tag.
http://jsfiddle.net/ozr598jb/6/
您将采用引导悬停规则并使用inherit
取消背景颜色(默认值,即none
):
.table-hover>tbody>tr:hover>td,
.table-hover>tbody>tr:hover>th {
background-color: inherit;
}
当然,设置其他悬停样式、其他颜色或边框等更有意义,否则首先不要在表上使用table-hover
类。
演示:http://jsfiddle.net/ozr598jb/3/
相关文章:
- 当鼠标悬停在文本中的单词上时显示警报
- d3.js鼠标悬停鼠标输出问题
- 悬停(鼠标离开)方法不显示效果
- 为什么addEventListener只执行我的函数,而不为其创建鼠标悬停/鼠标打开事件
- 在鼠标悬停/鼠标出类中的任何元素时更改元素 ID
- 检测鼠标悬停/鼠标单击,无论 Z 顺序/图层级别如何
- 悬停/鼠标悬停功能冲突
- 子元素的 JavaScript 鼠标悬停/鼠标退出问题
- 在 iPad 上触发悬停/鼠标退出/模糊
- 如何通过按钮单击和鼠标悬停/鼠标退出显示和隐藏节点文本?D3/JS.
- 背景图像在悬停/鼠标悬停时消失,菜单在IE中不起作用
- jQuery鼠标悬停/鼠标悬停将不适用于Live
- jQuery-悬停以在刷新时触发悬停/鼠标悬停
- 悬停/鼠标悬停未在元素内部的每次移动中激活
- HighCharts条形图:悬停鼠标时显示条形值
- 鼠标悬停/鼠标离开,鼠标进入/鼠标离开,鼠标悬停闪烁问题
- 滚动时未触发鼠标悬停/鼠标输入
- JavaScript-如何在鼠标悬停/鼠标悬停上同时更改TR中所有TD的背景颜色
- 记住并在悬停鼠标悬停后显示以前活动的导航选项卡
- JavaScript延迟CSS悬停/鼠标悬停效果