在iframe里调用bootstrap的modal问题

新手上路,请多包涵

页面结构如下:

<html>
<header><title>test</title></head>
<body>
    <div class="header"></div>
    <div class="content">
        <div class="left"></div>
        <div class="right"><iframe name="right" onload="autoHeight();" id="rightMain" src="1.html" frameborder="false" scrolling="no" style="border:none; " width="100%" height="auto" allowtransparency="true"></iframe></div>
    </div>
</body>
</html>

我在1.html里调用了bootstrap的modal。弹出框就显示在iframe里。我想让弹出框显示在最外层。

现实:
图片描述

理想:
图片描述

阅读 9.8k
2 个回答

用iframe通信的办法,把弹出modal的信息加载到iframe外再弹就好。

新手上路,请多包涵

你好,我现在也在学习Bootstrap和iframe这种框架,能否发下你的源码,学习研究一下,244282742@qq.com ,谢谢。。在线等!

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进