jQuery dataTable更改行颜色 [英] Jquery dataTable change row color
本文介绍了jQuery dataTable更改行颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用JQuery数据表,
我需要更改鼠标悬停事件(高亮行)上的行的颜色
我尝试过:
I am using JQuery datatable,
I need to change the color of the row on the mouse over event (the highligthed row)
I tried:
table.display tr.even.row_selected td {
background-color: red;
}
table.display tr.odd.row_selected td {
background-color: blue;
}
推荐答案
尝试使用此 CSS
:
table.display tbody tr:nth-child(even):hover td{
background-color: red !important;
}
table.display tbody tr:nth-child(odd):hover td {
background-color: blue !important;
}
UPDATED jsFIDDLE DEMO
这篇关于jQuery dataTable更改行颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文