问题描述
这是一个小提琴(jsfiddle.net/salman/RQBra/show/),它展示了我面临的问题。 iframe在所有浏览器中都显示为预期(包括Safari 5 for Windows)。但是当我在两个iOS设备(iPad和iPhone)上查看该页面时,iframe的内容溢出并覆盖了iframe右侧的整个区域。以下是使用类似iframe的网页的屏幕截图:
Here is a fiddle (jsfiddle.net/salman/RQBra/show/) that demonstrates the problem I am facing. The iframes appear as expected in all browsers (including Safari 5 for Windows). But when I viewed the page on two iOS devices (iPad and iPhone) the content of iframe overflowed and covered the entire area on the right hand side of the iframe. Here is a screenshot of a page that uses similar iframes:
如何解决此问题?
推荐答案
嗯,尝试将iframe包装在div中,但不要自己约束iframe的宽度和高度。
Hmm, try to wrap the iframes in divs, but not constraining the iframe's width and height by themselves.
这篇关于iframe内容显示在iOS上的iframe外部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!