javascript - Bootstrap 弹出模式在我的网页上不起作用

标签 javascript bootstrap-4 bootstrap-modal

引导弹出窗口未显示在我的网站上。我从 Bootstrap 官方网站复制了弹出代码。 这是我的网站链接Link to webiste

弹出按钮位于页脚字幕之前。 enter image description here

最佳答案

目前状况:

Solution:

  • You have footer, <footer class="footer-social-icon text-center section_padding_70 clearfix">
  • Some how there is z-index:-101; and position:fixed; in <footer>
  • You need to remove model outside from <footer> and apply directly before </body> tag ends.

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>


<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLong">
    Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLongTitle">Modal title</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                ...
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>

我希望它能正常工作。

网站的旧代码是:

关于javascript - Bootstrap 弹出模式在我的网页上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52090545/

相关文章:

html - 具有不同高度列的 Bootstrap 行

javascript - 将 txt 文件导入模态正文

javascript - 为什么我的神经网络训练方法没有被调用? (ML5.JS)

javascript - 如何在 Django 项目中下载 python-docx 生成的文档?

javascript - jquery.js 和 bootstrap.js 冲突

html - 向 Bootstrap 列添加小的左边距时防止 y 溢出

php - Foreach 视频创建模态

css - Bootstrap Modal 打开模态的不同部分

javascript - 使用 Protractor 获取所有元素属性

javascript - Focus() 在使用 ios 10 safari 浏览器的 ionic 中不起作用