[英]How to fix iFrame issues (iOS) in Cordova/Phonegap?
我的Cordova应用程序中有一个iframe,但我遇到了严重的问题。 在iPad上,iframe不会最大化,而只能加载到一个角落。 谁能帮助解决我的问题...
这是我的iframe代码...
<div id="wrapper" style="width: 100%; height: 100%; overflow: auto; -webkit-overflow-scrolling: touch;">
<iframe src="http://example.com"></iframe>
</div>
我正在使用iframe在cordova 3.5 + jquery移动项目中加载外部页面,并且可以正确加载页面。
<iframe src="http://google.com/" frameborder="0" style="width: 100%; height: 100%;"></iframe>
我遇到了jquery mobile会在其页面或div周围放置的一些填充问题,因此对于加载iframe的div,我将填充删除为:
/*for devcontent to remove the default jquery mobile padding*/
#devContent{
padding: 0em !important;
}
这在iPhone和iPad上都加载良好。 对于android,有些高度问题必须以像素为单位设置,但是我不确定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.