1
我的问题是关于JQM
。我目前正在开发一个移动应用程序,其中包括一个固定的页眉和页脚。 在Safari
和Chrome (Mac)
一切工作正常,但是当我在iPhone
或iPad Safari
上查看应用程序时,固定的页眉和页脚不会在第一时间保持最佳状态。滚动和停止后,页眉和页脚保持不变,正如他们应该的那样。jQuery Mobile固定页眉和页脚在第一时间滚动。 (Bug?)
我来源:
<!DOCTYPE html>
<html>
<head>
<script src="phonegap.js"></script>
<title>Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="jquery/jquery.mobile-1.2.0.min.css" />
<link rel="stylesheet" href="jquery/jquery.mobile.theme-1.2.0.css" />
<script src="jquery/jquery-1.8.2.min.js"></script>
<script>
$(document).bind("mobileinit", function() {
$.mobile.page.prototype.options.addBackBtn = true;
});
</script>
<script src="jquery/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<div data-role="page" id="master">
<div data-role="header" data-position="fixed" class="header-custom">
<img src="images/logo.png" style="height: 44px;"> <a href="index.html" data-icon="refresh" id="refreshButton" class="ui-btn-right" style="fmargin-top: 4px;" data-iconpos="notext">Aktualisieren</a>
</div>
<!-- /header -->
<div data-role="content">
<ul data-role="listview" id="rssListView"></ul>
</div>
<!-- /content -->
</div>
<!-- /page -->
</body>
</html>
自定义头类:
/* Custom navbar */
.header-custom {
height: 44px;
background-image: url(images/header.png);
background-size: cover;
}
张贴的CSS和HTML不涉及您的问题。你可以plz发布各自的代码,CSS和JS? – Jai
你的意思是哪一部分?其他的东西只是JQM的标准构造。我会更新我的帖子。 - >我为此找到了一个“修复”,但我对此并不满意。如果我滚动窗口1px,标题刷新和完美的作品。 (文档)$ .scrollTop(1); –