所以我正在使用 Bootstrap 4 Beta 并希望在显示模态时使背景变暗。我看到一个帖子,我只需要添加 css 类
.modal-backdrop.in {
opacity: 0.5 !important;
position: fixed;
}
Run Code Online (Sandbox Code Playgroud)
到我的 CSS 文件。他们写道,我不需要将类添加到 div,只需将其添加到 CSS 文件中即可。所以如果我只是添加它,它不会发生任何事情。如果我然后将类也添加到我的模态 div 中,一切都会得到不透明度,甚至是模态本身。有人知道如何解决吗?
所以我想在表行中添加一个类(标题除外),但我不知道该怎么做。有人知道我该怎么做吗?
这是我的桌子:
<table id="table" class="hidden table table-bordered table-striped table-hover">
<thead>
<tr>
<th data-field="variant">Variant</th>
<th data-field="description">Description</th>
</tr>
</thead>
</table>
Run Code Online (Sandbox Code Playgroud)
目前这是我添加数据并想要将类添加到行中的位置
$('#table').bootstrapTable({
data: returnValue
});
Run Code Online (Sandbox Code Playgroud)