iframe内容仅在ios设备上显示在iframe外部

时间:2019-03-12 14:06:04

标签: javascript html ios css iframe

有些奇怪的事情正在发生,我有一个网站在iframe内实现iframe。在除ios之外的所有设备上,所有设备均可正常工作。在ios设备中,内部内容iframe会溢出包含它的iframe的边框。

代码如下:

<iframe type="text/html" frameborder="0" allow="autoplay" id="playIframe" scrolling="no" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" src="https://example2.com?type=clip&id=555&autoplay=true" width="100%" height="100%">
    <div style="width: 100%; height: 100%;">
        <iframe id="vid" frameborder="0" scrolling="no" allow="autoplay" src="https://example2.com/555/?type=mp4&autoplay=true&forceHTML5=true" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen="true" width="100%" height="100%"></iframe>
    </div>
</iframe>

当我在开发人员控制台中关注iframe时,我们可以看到结果,图片是暂停的视频,是iframe的内容。看起来它在iframe之外: child iframe parent iframe

我尝试了所有建议的in this tread。 有人有类似的问题吗?

0 个答案:

没有答案