![](/img/trans.png)
[英]Highlight the row of a table on mouseover using Javascript and CSS
[英]Add highlight on clickable table row (using bootstrap) - CSS
我想在鼠标悬停(悬停)上突出显示行。 我正在使用bootstrap并在桌面上使用他们的类table-striped
,所以当我写css时:
tbody {
tr:hover {
background-color: #ff0;
}
}
它只会改变白色行的颜色,而不会改变其他行的颜色。 不确定解决这个问题的最佳方法是什么。 也许我可以以某种方式覆盖表条纹突出显示? 我该怎么办?
尝试使用'table-hover'并覆盖这样的颜色..
.table-hover>tbody>tr:hover>td, .table-hover>tbody>tr:hover>th {
background-color: #550055;
color:#eeeeee;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.