页面背景删除模式时(使用AJAX称为数据)打开
问题是我打开一个名为contents(例如搜索结果或任何其他AJAX)的模态时出现的。
打开模式后,页面的背景会自动删除。
当我关闭模态时,背景保持空白。
以下是模态的代码。
<div class="modal" id="paymentData" tabindex="-1" role="dialog" aria-labelledby="paymentData" aria-hidden="true">
<div class="modal-dialog modal-lg modal-search">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<div class="modal-body">
<div class="fetched-data"></div>
</div>
</div>
</div>
</div>
这仅在我用ajax打开模式称为数据时才发生。
- 我注意到当我打开模态时,几乎所有样式都会从页面上删除。甚至导航栏的样式。
I am using Bootstrap v4 and have a strange issue.
Problem comes when I open a modal with ajax called contents such as search results or any other ajax.
Immediately after opening modal, background of the page removes automatically.
When I close the modal, background remains blank.
Following is the code of the modal.
<div class="modal" id="paymentData" tabindex="-1" role="dialog" aria-labelledby="paymentData" aria-hidden="true">
<div class="modal-dialog modal-lg modal-search">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<div class="modal-body">
<div class="fetched-data"></div>
</div>
</div>
</div>
</div>
This happens only when I open modals with ajax called data.
--
I noticed when I open the modal almost all the styles remove from the page. Even the styles of the navigation bar.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论