|
[开发工具]
openWin之后没有界面,而其余界面正常
[复制链接]
本帖最后由 BIP119148 于 2022-5-8 22:06 编辑
代码如下,同样的代码在别的界面就能正常显示,但是这个界面就不显示,而且在网页模拟器上是显示的
手机和apploader上也是显示空白页,求大佬指点迷津
默认**.**和api.js文件<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<title>Hello APP</title>
<link rel="stylesheet" type="text/css" href="../css/api.css" />
<style type="text/css">
html,
body {
height: 100%;
}
.wrap {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-flex-flow: column;
}
header {
height: 44px;
width: 100%;
text-align: center;
background-color: #81a9c3;
color: #fff;
line-height: 44px;
font-size: 20px;
background-image: url('../image/pic20X20.png');
background-size: 40px;
background-position: right bottom;
background-repeat: no-repeat;
}
.flex-1 {
-webkit-box-flex: 1;
-webkit-flex: 1;
}
footer {
height: 30px;
width: 100%;
background-color: #81a9c3;
color: white;
line-height: 30px;
text-align: center;
}
</style>
</head>
<body class="wrap">
<header>头5</header>
<section class="flex-1"></section>
<footer>脚5</footer>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
apiready = function() {
var header = $api.dom('header'); // 获取 header 标签元素
var footer = $api.dom('footer'); // 获取 footer 标签元素
var headerH = $api.fixStatusBar(header);
var footerH = $api.fixTabBar(footer);
api.openWin({
name: 'win5',
url: '../html/win5.html',
bounces: false,
rect: { // 推荐使用Margin布局,用于适配屏幕的动态变化
marginTop: headerH, // main页面距离win顶部的高度
marginBottom: footerH, // main页面距离win底部的高度
w: 'auto' // main页面的宽度 自适应屏幕宽度
}
});
}
</script>
</html>
|
-
-
apploader和手机都无法显示这个页头页尾
|