iOS iFrame Overflow bug

2019-08-03 23:52发布

问题:

An iFrame on a website accessed by an iOS device shows the entire height of the webpage being pulled in by the iFrame, despite the height of the iFrame being set via CSS. Wrapping it in a container with overflow:hidden does nothing. The only solution I've found is using:

overflow: auto;
-webkit-overflow-scrolling: touch;

which hides the content, but the height of the iFrame still extends to the entire height of the webpage pulled in, which can result in excessive scrolling. Is there a way to force the iFrame to be a certain height and not show the content beyond that height? I'm not concerned with scrolling or any other functionality.

标签: css ios5 iframe