-5

The iframe on my page is being shifted down about 20 pixels each time iPhone is rotated.

The only content on my page is a body tag and the iframe tag, and it only seems to happen when the iframe is pointed to my game.html.

enter image description here

Has anyone else run into this issue or know how to troubleshoot it?

CODE:

<iframe id="gameiFrame" src="game.html" width="100%" height="500"></iframe>

UPDATE:

The iframe itself is not moving down, rather the iframe content is. The game.html file is 3rd party proprietary and obfuscated code but I know it is executing javascript to center the content on the page.

4

2 回答 2

0

iFrame 本身的内容在每次旋转时都会向下移动,对此我真的无能为力。

作为一种解决方法,我计算了每次旋转并将 iFrame 向上移动了 30 像素左右。

于 2013-07-14T16:10:39.713 回答
0

将其锁定在顶部!一个快速的谷歌搜索产生了这个 onLoad="if(parent.frames.length!=0)top.location='pagename.html';"

于 2013-07-12T13:32:24.013 回答