2017-07-01 66 views
0

我在Apache cordova中创建了一个程序。我的程序只是一个打开网站的iframe。
但我有滚动我的网页之前5版本的Android版本的问题。我的问题是在图片:在科尔多瓦的浏览器应用程序

可以看出,文本没有被正确地放置。

我的代码是这样的

<div data-role="page" data-theme="a">   
    <div data-role="content" data-theme="a" id="theParent" style="height:100%; padding:0px; overflow:scroll !important;-webkit-overflow-scrolling:touch !important;"> 
     <!--<button id="myBtn" onclick="gourl();"> go to url </button>--> 
     <iframe style="width:100%; border:0px; height:100%;" scrolling="yes" frameborder="0" src="http://shahreman.biz" id="urlshow"> 
     </iframe> 

     <script> 
      //document.getElementById("myBtn").addEventListener("click", gourl()); 
      //var physicalScreenHeight = window.screen.height * window.devicePixelRatio; 
      var physicalScreenHeight = window.innerHeight; 
      //physicalScreenHeight=(physicalScreenHeight/100)*97; 
      var heightiframe=physicalScreenHeight+"px" 
      //alert(heightiframe); 
      document.getElementById('urlshow').style.height=heightiframe; 
      function gourl() 
      { 
       document.getElementById('urlshow').src = 'http://shahreman.biz'; 
      } 
     </script> 

    </div> 
</div> 
+1

你好,欢迎来到StackOverflow。随着形象,请清楚描述你的问题,并提出一个相关的问题。请参见[如何创建最小,完整和可验证的示例](https://stackoverflow.com/help/mcve)。 –

回答

0

那只是因为你没有想建立使用I帧在科尔多瓦的应用程序。您可以使用PhoneGap并将您的html和所有内容放入新项目中,然后使用PhoneGap Desktop模拟器或使用CLI运行它,以查看它在移动设备中的工作原理。从捕获看起来你有填补divs的问题。祝你好运

相关问题