jQuery dataTable更改行颜色 [英] Jquery dataTable change row color

查看:104
本文介绍了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;
}

JSFiddle

推荐答案

尝试使用此 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;
}

更新了jsFIDDLE演示

UPDATED jsFIDDLE DEMO

这篇关于jQuery dataTable更改行颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆