ios - iOS iPhone 上的 Iframe 显示问题

标签 ios css iphone iframe

我遇到了一个奇怪的问题,即 iframe 在某些手机上显示,但在某些手机上不显示。 (显示在所有机器人上) (不适用于 iphone 6,7 但适用于 7 plus 和 7S 以及其他一些 iphone)

<div class="col-lg-6 col-md-6">
 <iframe src='http://app.brandyourcar.com/signup/index/form-main-display-group-thingy' style='border: 0;' width='100%' height='770px' scrolling='no'></iframe>
</div>enter code here

我在 Stack 上尝试了很多解决方案,但似乎没有一个适合我。

几个例子 :1.) <div id="scroller" style="height: 400px; width: 100%; overflow: auto;"> <iframe height="100%" id="iframe" scrolling="no" width="100%" id="iframe" src="url" /> </div> 2.) <div id="scroller" style="height: 400px; width: 100%; overflow: auto;"> <iframe height="100%" id="iframe" scrolling="no" width="100%" id="iframe" src="data/testdocument.pdf" /> </div> 以及许多其他 Java 脚本解决方案。

最佳答案

发生这种情况是因为最新版本的 safari 有一个名为“防止跨站点跟踪”的新安全功能,默认启用,不允许第三方 cookie。用户可以禁用它,但我试图找到一种解决方法来避免用户干预。现在,您可以检测是否允许第三方 cookie,如果不允许,您可以显示一条警告消息,说明如何禁用此功能。

希望对你有帮助。

关于ios - iOS iPhone 上的 Iframe 显示问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47177626/

相关文章:

iphone - 用于在 Web View 中检查连接的简单警报 View

ios - GLK View Controller : Setting up independent objects using GLKit

单击 jQuery 显示 div 但它闪烁并消失

html - 列表未按预期水平显示

html - 对齐 div 以在所有浏览器中工作 >= IE8

ios - iOS 应用程序的用户界面似乎因未知原因而被放大

iphone - 在 iphone 中将此 Html 文本转换为简单文本

objective-c - 虚拟警告:不支持的配置最小字体大小大于当前字体大小

ios - 将 UITbale View 连接到 firebase 实时数据库时出现解包错误

iPhone localstorage 生命周期 - 它是否在应用程序更新后仍然存在?