Html Bootsrap 4模式在粘性顶部导航栏中不工作

Html Bootsrap 4模式在粘性顶部导航栏中不工作,html,css,bootstrap-4,navbar,Html,Css,Bootstrap 4,Navbar,我在粘性顶部导航栏中使用了模态。但是模态没有正常工作。当我移除粘性顶部模式时,它正在工作。 在此处粘贴我的代码: 我在粘性顶部导航栏中使用了模态。但是模态没有正常工作。当我移除粘性顶部模式时,它正在工作。 在此处粘贴我的代码: <!DOCTYPE HTML> <html> <head> <!-- Required meta tags --> <meta charset="utf-8">

我在粘性顶部导航栏中使用了模态。但是模态没有正常工作。当我移除粘性顶部模式时,它正在工作。 在此处粘贴我的代码:

我在粘性顶部导航栏中使用了模态。但是模态没有正常工作。当我移除粘性顶部模式时,它正在工作。 在此处粘贴我的代码:

<!DOCTYPE HTML>
    <html>
    <head>
    <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">


    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>


<title>Modal</title>

</head>
 <style>


 </style>
<body>

<div class="navbar sticky-top">


   <button type="button" class="btn btn-outline-light" data-toggle="modal" data-target="#exampleModalCenter">
    <img src="help.jpg">
    </button>


    <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
      <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                  <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalCenterTitle">Customer Support</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                      <span aria-hidden="true">&times;</span>
                    </button>
                  </div>  
            </div>
        </div>
     </div>


</div>









 <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>


</body>
</html>

情态动词
客户支持
&时代;

改变位置:固定;至
位置:未设置来自.modal background,您完成了

.modal background{
位置:未设置!重要;
}

情态动词
客户支持
×

将型号代码移出导航栏。 模态将与背景一起正常工作


情态动词
客户支持
&时代;

这个问题也不起作用。请在问题中添加问题的相关代码片段。不要指望有人会挖苦你网站的代码。另外,如果没有代码,这个问题对于将来的参考也毫无用处。对不起我的错误@superdj你认为这是一个家庭作业网站吗?提供一些代码,向我们展示您的尝试。你很幸运@CodeGator回答了你的问题。等等,没问题,对不起,先生。我试图提供代码,但当时有一些错误。我不熟悉这个网站。尝试学习如何提问以及如何添加代码。抱歉我的错误@tenzolinho谢:)@CodeGator