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