在 bootstrap 表详细 View 中,每一行都有一个加号图标。我正在使用一些样式来删除那个加号图标。然后它也会影响其他表。在其他表中,整个表的第一列也会隐藏。我可以知道一个解决方案吗?
.detail-view-table thead > tr > th.detail,
.detail-view-table tbody > tr:not(.detail-view) > td:first-of-type {
display: none;
}
.detail-view-table thead > tr > th:nth-child(2),
.detail-view-table tbody > tr:not(.detail-view) > td:nth-child(2) {
border-left: none!important;
}
最佳答案
我建议您使用 parent child
选择器 CSS,由此,您需要为表格的父元素声明一个 class
。
例如,如果表格在 div
中,则添加一个名为 .hide
的 class
并将其作为父级,然后选择您的子表。
示例
.hide .detail-view-table thead > tr > th.detail,
.hide .detail-view-table tbody > tr:not(.detail-view) > td:first-of-type {
display: none;
}
这样做不会影响其他表,但会影响您想要影响的表。
这将为您提供所需的信息。 希望这会有所帮助。
关于javascript - Bootstrap 表详细信息 View 没有加号图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37185409/