|
如题 我在本地执行的时候显示很正常 如下:
在手机上显示 如下 :
开始的时候我在网页打开也是很小的 上网查了一下 需要在<head></head>里面加上一个 <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1" /> 我加了这个之后 浏览器显示就正常了 但是我打包成安卓的apk的时候 安装在手机上就显示成了下面的那个很小的字体。代码如下
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1" />
<link href="css/jquery.mobile.structure-1.3.2.css" rel="stylesheet" type="text/css"/>
<link href="css/jquery.mobile-1.3.2.css" rel="stylesheet" type="text/css"/>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.mobile-1.3.2.min.js" type="text/javascript"></script>
<title>Hello World</title>
</head>
<body>
<div data-role="page" id="page">
<script type="text/javascript">
$(document).on("pageinit","#page",function(){
$("#gmzhiling").bind("click",function(){
location.href="gmtools.html";
});
$("#renshu").bind("click",function(){
location.href="renshu.html";
});
$("#chongzhi").bind("click",function(){
location.href="chongzhi.html";
});
});
</script>
<div data-role="header" data-position="fixed">
<h1>雪鹄后台</h1>
</div>
<div data-role="content">
<div class="ui-grid-b">
<span id="renshu"> <div class="ui-block-a">
<div data-role="navbar" class="ui-bar ui-bar-e" style="height:60px">在线人数</div>
</div></span>
<span id="gmzhiling"> <div class="ui-block-b" >
<div class="ui-bar ui-bar-e" style="height:60px">GM指令</div>
</div></span>
<span id="chongzhi"><div class="ui-block-c">
<div class="ui-bar ui-bar-e" style="height:60px">充值</div>
</div></span>
</div>
</div>
<div data-role="footer" data-position="fixed">
<div data-role="navbar" data-iconpos="bottom">
<ul>
<li> <a href="index.html" id="gongneng" data-icon="grid">功能</a> </li>
<li> <a href="usereditor.html" id="wo" data-icon="star">我</a> </li>
</ul>
</div>
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
</body>
</html>
|
|