首页 > 移动平台 > 详细

cordova iOS blank iframe iphone iframe 白屏 ios iframe 白屏

时间:2016-12-24 02:21:08      阅读:1081      评论:0      收藏:0      [点我收藏+]

(1)解决方案

http://stackoverflow.com/questions/36572537/cordova-ios-blank-iframe/36587026

 

在 index.html中配置meta

<meta http-equiv="Content-Security-Policy" 
content="default-src *; frame-src *; style-src * ‘self‘ ‘unsafe-inline‘ ‘unsafe-eval‘; 
script-src * ‘self‘ ‘unsafe-inline‘ ‘unsafe-eval‘;">

 

context-security-policy中详细请查看:

https://content-security-policy.com/

 

(2)在config.xml中配置

<access origin="*" subdomains="true" />
<allow-navigation href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />

 

以上就可以在 iphone 通过 iframe导入,但是别忘记,argularjs中的把url设置为可信源

$sce.trustAsResourceUrl(url)

 (3)cordova+ionic+argular  在android中

让滚动条仍然存在

但是隐藏,可使用下面的CSS

::-webkit-scrollbar, *::-webkit-scrollbar { display: none; }

cordova iOS blank iframe iphone iframe 白屏 ios iframe 白屏

原文:http://www.cnblogs.com/fujinliang/p/6216457.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!