写的webview模式,官方的demo
顶部tab自定义的50px高度 原本的dome好像是44px
浏览器调试
内容浏览器调试页面
在苹果手机真机调试页面选项卡高度的div没有了一截
不懂事哪里设置的高度,不关内容页面的事,就是真机调试哪里设置的高度问题,但找不出。
大概就是按照这个demo改的代码,自定义高度要怎么调啊
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="css/mui.min.css">
</head>
<body>
<div class="mui-content">
<div id="slider" class="mui-slider mui-fullscreen">
<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
<div class="mui-scroll">
<a class="mui-control-item mui-active" href="#item1mobile" data-wid="movie_home.html">推荐</a>
<a class="mui-control-item" href="#item2mobile" data-wid="TV_play.html">电视剧</a>
<a class="mui-control-item" href="#item3mobile" data-wid="top_movie.html">电影</a>
<a class="mui-control-item" href="#item4mobile" data-wid="top_variety.html">综艺</a>
<a class="mui-control-item" href="#item5mobile" data-wid="top_entertainment.html">娱乐</a>
</div>
</div>
</div>
</div>
<script src="js/mui.min.js"></script>
<script src="js/webviewGroup.js" type="text/javascript" charset="utf-8"></script>
<script>
mui.init();
mui.plusReady(function() {
var group = new webviewGroup("top_tab.html", {
items: [{
id: "movie_home.html", //这是子页1的路径
url: "movie_home.html",
extras: {}
}, {
id: "TV_play.html", //这是子页2的路径
url: "TV_play.html",
extras: {}
}, {
id: "top_movie.html", //这是子页2的路径
url: "top_movie.html",
extras: {}
}, {
id: "top_variety.html", //这是子页2的路径
url: "top_variety.html",
extras: {}
}, {
id: "top_entertainment.html", //这是子页2的路径
url: "top_entertainment.html",
extras: {}
}],
onChange: function(obj) {
var c = document.querySelector(".mui-control-item.mui-active");
if(c) {
c.classList.remove("mui-active");
}
document.querySelector(".mui-scroll .mui-control-item:nth-child(" + (parseInt(obj.index) + 1) + ")").classList.add("mui-active");
}
});
mui(".mui-scroll").on("tap", ".mui-control-item", function(e) {
var wid = this.getAttribute("data-wid");
group.switchTab(wid);
});
});
mui.back = function() {
var _self = plus.webview.currentWebview();
_self.close("auto");
}
</script>
</body>
</html>