1

My issue with Bootstrap modal is that when i click on the button that must open a modal, the model will open fine, but without highlight, means i can click anywhere, no matter where, its will instantly close itself and the content of the model is behind the "shadow". How to get the content Highlighted? I've using a similar plugin called Lightbox V2. Tried to disable it but its the same issue.

<button type="button" data-toggle="modal" data-target="#myModal" class="btn" >Regis</button>

<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…&lt;/p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>
4

2 回答 2

1

您应该在模态中显示的内容是否仍然隐藏在模态的较暗覆盖层下,并且您不应该访问该隐藏的内容?如果这是您的问题,那么我建议您检查在of modal<div>之前的所有 s<div>是否正确关闭,因为我遇到了同样的问题,当我检查我的代码时,我发现我错过了关闭一个应该在模态的代码部分之前完成。

于 2013-10-18T07:50:34.907 回答
0

尝试hide从模态 div 中删除该类:
<div id="myModal" class="modalhidefade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

于 2014-03-15T05:50:23.807 回答