【问题标题】:IOS10 above system, mixed content,background-image inserted picture does not displayIOS10以上系统,内容混合,背景图片插入图片不显示
【发布时间】:2018-03-31 04:47:18
【问题描述】:

IOS10以上系统,混合内容(html by https,img by http),调用geolocation.getCurrentPosition时,background-image插入图片不显示

<pre>
<div id="aaa" style="background-image:url(http://xxx.jpg);height:200px;"></div>
<script>
    navigator.geolocation.getCurrentPosition(function (res) {
        console.log(res);
    });
</script>
</pre>

【问题讨论】:

    标签: ios geolocation mixed-content


    【解决方案1】:

    这是正确的行为。在 https 页面上,不得显示所有 http 内容,因为它是不安全的。即使是通过JS插入。浏览器根本不会请求此类内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-09-24
      • 2020-09-11
      相关资源
      最近更新 更多