Bootstrap table-hover table-striped with datatables hover not work on the striped row

时间:2021-03-19 22:18:23

标签: javascript css bootstrap-4 datatables

我无法让 bootstrap4 与数据表、表格条带化和表格悬停一起工作。

有什么想法吗?

table.dataTable tbody tr:hover {
    background-color: #71d1eb !important;
}
.table-hover > tbody > tr:hover {
    background-color: #71d1eb !important;
}
.table-striped > tbody > tr:nth-child(2n+1):hover{
    background-color: #71d1eb !important;
}

以上都行不通。如果我尝试:

.table-striped > tbody > tr:nth-child(2n+1) > td:hover{

它可以工作,但只会绘制列单元格,而不是整行。

我真的不知道是什么覆盖了它。它只适用于白行,不适用于条纹行。 这是所需的 html,但我愿意接受更改:

<table class="table table-hover table-striped" id="list">

我阅读了很多示例并尝试了它们。无论出于何种原因,有关该主题的所有 github 问题均已解决。

0 个答案:

没有答案
相关问题