我正在使用一个 div 来容纳一个 iframe 来模拟一个弹出窗口。但是,iframe 加载的网页有一个下拉菜单,最终位于 div 之外。我如何使它留在 div 中?我认为这可能是一个溢出问题,但我所做的一切似乎都没有改变。图片是我说的截图。 .当到达较暗区域时,下拉菜单应该停止。
<head>
<style>
#box{
display: none;
position:fixed;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1001;
-moz-opacity: 0.4;
opacity:.40;
filter: alpha(opacity=40);
}
#popup{
display: none;
position: fixed;
top: 35%;
left: 40%;
width: 1000px;
height: 625px;
margin: -190px 0 0 -281px;
z-index:1002;
overflow: auto;
background-color: white;
}
#popupIframe{
display: block;
position: fixed;
top: inherit;
left: inherit;
width: inherit;
height: inherit;
margin: -190px 0 0 -281px;
z-index:1000;
overflow:auto;
background-color: white;
}
#over{
position: absolute;
top: 0px;
right: 3px;
background-image: url(images/Button-Close-icon.png);
background-repeat:no-repeat;
height: 32px;
width:32px;
z-index:1003;
}
</style>
</head>
<body>
<div id = "popup">
<iframe id = "popupIframe" src = "
http://quote.test.usli.com/instantquote/quote/promotion
" ></iframe>
<div id="over" onClick="closePopup();" > </div>
</div>
</body>
最佳答案
尝试给予
overflow:none
#popup
div
#popup{
display: none;
position: fixed;
top: 35%;
left: 40%;
width: 1000px;
height: 625px;
margin: -190px 0 0 -281px;
z-index:1002;
overflow: none;
background-color: white;
}
关于html - iframe 溢出 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23570381/