我想设置一行颜色如下:
<tr style="background-color:#c55186">
但由于某些原因,style 属性不会覆盖 tablesorters css。
用css单双是不行的。着色不遵循任何模式。
fiddle 测试页:
最佳答案
问题是theme.blue.css
包含
.tablesorter-blue td {
background-color: #fff;
}
因此,您看不到行的背景,因为单元格的背景隐藏了它。
然后,您可以使用,例如,
<tr class="customBackground">
.customBackground > td {
background-color: #c55186;
}
关于jquery - 如何在 jquery tablesorter 上动态设置行颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27474182/