Bootstrap 4 如何修复引导模式不透明度错误?

Bootstrap 4 如何修复引导模式不透明度错误?,bootstrap-4,bootstrap-modal,Bootstrap 4,Bootstrap Modal,我最近刚刚使用了“引导模式”,我在显示模式本身时遇到了问题。这种模式很好用。然而,模态背景本身似乎是纯黑色的。模态背景本身应该是透明的吗?我真的找不到这里的错误 以下是模态触发代码: <label for="notes"> <a href="#notes" data-toggle="modal"> <i class="fa fa-sticky-note"></i> Create Notes </a> &l

我最近刚刚使用了“引导模式”,我在显示模式本身时遇到了问题。这种模式很好用。然而,模态背景本身似乎是纯黑色的。模态背景本身应该是透明的吗?我真的找不到这里的错误

以下是模态触发代码:

<label for="notes">
    <a href="#notes" data-toggle="modal">
        <i class="fa fa-sticky-note"></i> Create Notes
    </a>
</label>

以下是模式:

<div class="modal" id="notes" role="dialog"> <!-- modal -->
    <div class="modal-dialog">
        <div class="modal-content">
            <form action="#" method="post">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <textarea name="note_title" placeholder="Your title here. 48 characters max only." pattern="{1,48}"></textarea>
                <textarea name="note_record"></textarea>
                <button type="submit" name="submit_notes" style="float: right;"><i class="fa fa-paper-plane"></i> Submit</button>
            </form>
        </div>
    </div>
</div>

&时代;
提交
这是模态激活前的输出

以下是激活时的模式(单击蓝色的“创建注释”链接)


感谢您提供的可能答案,stackoverflow

您似乎在使用Bootstrap-3的JS时使用了Bootstrap-4 CSS

使用正确的bootstrap.js库修复了此问题

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>


这是同样的js提琴:

请在开发者控制台中检查模态背景的不透明度。模态背景也不会改变不透明度。您可以添加一些片段或JSIDLE吗?在这里我发现了问题,这是因为您的bootstrap.min.js感谢@Aditya Thakur的巨大帮助。我真的很感激:)是您使用的引导版本,我在GitHub中找不到问题,但是如果您更新到>4.0,您不需要在组件中添加样式不透明度