0
我在應用程序瀏覽器中有一個應用程序,它顯示了一個使用intel xdk的網站。在應用程序瀏覽器不會加載
網站加載在模擬器和我的Windows手機上的應用程序瀏覽器(但圖像不顯示),但它不會加載到我的iPad上。屏幕保持空白。
我的代碼:
<!DOCTYPE html>
<html>
<!-- * Please see the included README.md file for license terms and conditions. -->
<head>
<title>Window.open</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<!-- see http://webdesign.tutsplus.com/tutorials/htmlcss- tutorials/quick-tip-dont-forget-the-viewport-meta-tag -->
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0;"/>
<style>
/* following two viewport lines are equivalent to meta viewport statement above, needed for Windows */
/* see http://www.quirksmode.org/blog/archives/2014/05/html5_dev_conf.html and http://dev.w3.org/csswg/css-device-adapt/ */
@-ms-viewport { width: 100vw ; min-zoom: 100% ; zoom: 100% ; } @viewport { width: 100vw ; min-zoom: 100% zoom: 100% ; }
@-ms-viewport { user-zoom: fixed ; min-zoom: 100% ; } @viewport { user-zoom: fixed ; min-zoom: 100% ;
</style>
<!-- Uncomment "phantom" cordova.js script if you convert your "Standard HTML5" project into a "Cordova" project. -->
<!-- <script src="cordova.js"></script> --> <!-- phantom library, needed for Cordova api calls, added during build -->
<script src="js/app.js"></script> <!-- recommended location of your JavaScript code relative to other JS files -->
<script src="xdk/init-dev.js"></script> <!-- normalizes device and document ready events, see README for details -->
<script src="cordova.js"></script>
<script>
function openwin(){
window.open('http://www.stackoverflow.com', '_blank', '');
}
</script>
</head>
<body onload="openwin()">window open>
</body>
</html>
感謝
你有哪個iOS版本?使用vw的寬度定義在iOS 6和7中有一些問題,並且早些時候根本不可用。當然只適用於iOS 8。 – mico
我的測試設備是運行IOS8的iPad,它是iPad 2。 –