小编Kod*_*der的帖子

Bootstrap 4 模态不透明度

所以我正在使用 Bootstrap 4 Beta 并希望在显示模态时使背景变暗。我看到一个帖子,我只需要添加 css 类

.modal-backdrop.in {
    opacity: 0.5 !important;
    position: fixed;
}
Run Code Online (Sandbox Code Playgroud)

到我的 CSS 文件。他们写道,我不需要将类添加到 div,只需将其添加到 CSS 文件中即可。所以如果我只是添加它,它不会发生任何事情。如果我然后将类也添加到我的模态 div 中,一切都会得到不透明度,甚至是模态本身。有人知道如何解决吗?

html css bootstrap-modal bootstrap-4

5
推荐指数
1
解决办法
7764
查看次数

将类添加到动态 Bootstrap 表行

所以我想在表行中添加一个类(标题除外),但我不知道该怎么做。有人知道我该怎么做吗?

这是我的桌子:

<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)

html javascript jquery twitter-bootstrap bootstrap-4

2
推荐指数
1
解决办法
8422
查看次数