简体   繁体   English

模态下面的面板或模态

[英]a panel or modal underneath a modal

Im new in web application and i came across the modal feature in bootstrap, i did researched and came across some examples that works perfectly fine but when i tried to copy what they did, an underlying image or panel or i dont know displays behind the modal... how to remove this? 我是Web应用程序的新手,我遇到了bootstrap中的模态功能,我做了研究并发现了一些非常好的例子,但当我试图复制他们所做的事情时,底层图像或面板或者我不知道模态背后的显示......怎么删除这个? ive been trapped in this thing for like 3 days.. haha.. thanks... 我已经被困在这件事3天了..哈哈..谢谢......

Here is the image:- 这是图像: -

在此输入图像描述

and the code from w3schools... this should work but i dont know why.. 来自w3schools的代码......这应该有用,但我不知道为什么..

<button type="button" class="btn btn-info btn-lg"    data-toggle="modal" data-target="#myModal">Open Modal</button>

<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Modal Header</h4>
      </div>
      <div class="modal-body">
        <p>Some text in the modal.</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
    </div>

  </div>
</div>

As I checked your code of modal, This is coming fine. 当我检查你的模态代码时,这很好。 check here 检查一下

The problem is in your html kindly show us the entire html so that we can debug your code. 问题在于你的html请告诉我们整个html,以便我们可以调试你的代码。

hi your code is working just fine. 嗨,你的代码工作得很好。 i find no problem with it. 我觉得没问题。

output of the code 输出代码

hopefully problem with the browser? 希望浏览器有问题吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM