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


(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; }


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM