javascript - Bootstrap 表详细信息 View 没有加号图标

标签 javascript jquery css bootstrap-table

在 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 中,则添加一个名为 .hideclass 并将其作为父级,然后选择您的子表。

示例

.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/

相关文章:

javascript - 如何使用JavaScript中的音频控件触发取消暂停?

javascript - 单击后更改下拉图标框的jquery

javascript - 如何使用 JavaScript 展开/折叠网站的一部分并更改图像

html - :nth-child doesn't work

javascript - 当一些是字符串而一些是数字时,如何对数组中的项目执行数学运算?

javascript - Emberjs 数组 Controller

javascript - Google map 未在使用 Avada 主题的实时网站上显示

jquery - jQuery ajax 调用后 IE 7 重定向

css - 如何在没有任何拉伸(stretch)但需要重复的情况下给出两个背景图像

css - 星号/ body 颜色的特异性/继承?