我正在研究bootstrap模式。目前,我的方案如下。我有一个父帧,有一些n嵌套帧。从第n个子帧开始,我想打开一个模态,但叠加层应该禁用整个窗口中的动作。我尝试在子项中打开模态并在父项中重叠。但是作为父窗口中的叠加层,它禁止我在模态窗口中执行操作。有人可以帮帮我。
我希望child1.html中的叠加层占据整个parent.html
或
child1.html中的模态开头应位于叠加之上,我可以在parent.html中添加
parent.html
<html>
<head>
</head>
<frameset rows="5%,95%">
<frame src="child.html"></frame>
<frame src="child1.html"></frame>
</frameset>
</html>
child.html
<html>
<head>
</head>
<body></body>
</html>
child1.html
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Open Modal</button>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</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>
</div>
</body>
</html>