简体   繁体   中英

IE8 Iframe over entire body

I have an iframe that is the same size as an entire page. It is over the page with no problem, however when scrolling the iframe in IE 8 the body underneath the frame scrolls with the frame. You can also click elements underneath the frame as well.

How can I get the browser to target only the iframe when it is visible?

I have tried

popup.focus(); 
top.document.body.blur();

but those come up undefined in the IE8 console?

thanks

Instead of an iframe covering the rest, you could do two div elements, and make only one visible. You can still put the iframe in the second div, but the point is to make only one div visible at a time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM