我在處理iPhone上的網站高度時遇到了問題。以下設置在所有其他設備(ipad,android手機)上運行得非常好,但在iphone設備上,網址欄消失後頁面高度不會更新,並且頁面底部會顯示空白區域。JQuery移動100%高度的頁面,這等於可見區域
<!DOCTYPE html>
<html>
<head>
<title>temp</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
<style type="text/css">
.ui-page{
min-height: 100% !important;
}
</style>
</head>
<body>
<div data-role="page" id="loadscreen" data-theme='c'>
<div data-role="content">
<div>
<a href="#" onClick="window.scrollTo(0, 1)">Scroll Up</a>
</div>
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>
網站:http://jsfiddle.net/hb8NH/2/
對不起,沒有爲我工作。 iPhone上的問題仍然存在。 – 2011-12-15 14:28:23