【问题标题】:Iframe display issues on iOS iPhonesiOS iPhone 上的 iframe 显示问题
【发布时间】:2017-11-08 10:44:58
【问题描述】:

我遇到了一个奇怪的问题,即 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 脚本解决方案。

【问题讨论】:

    标签: ios css iphone iframe


    【解决方案1】:

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

    希望对你有帮助。

    【讨论】:

      猜你喜欢
      • 2013-12-18
      • 2020-04-08
      • 1970-01-01
      • 1970-01-01
      • 2012-05-18
      • 1970-01-01
      • 2016-09-16
      • 1970-01-01
      • 2013-03-07
      相关资源
      最近更新 更多