我正在使用 jQuery Mobile 完成一个 Android 应用程序。
我的页面以结构为标准
<div data-role="page" id="notification">
<div data-role="header" data-position="fixed">
<img class="logo-ecosensors" src="img/logo-smart-bud-small.png">
<h1></h1>
<a href="#info" class="ui-btn ui-shadow ui-corner-all ui-btn-right ui-icon-back ui-btn-icon-notext">Back</a>
</div><!-- /header -->
<div class="msg-error"></div>
<div class="title">
<h2>Notification</h2>
</div>
<div role="content" class="ui-content">
<ul id="notif" style="margin-top:10px;" data-role="listview" data-inset="false">
<li>Actuellement, il n'y a pas de notifications.</li>
</ul>
</div><!-- /content -->
<div data-role="footer" data-position="fixed">
</div><!--
/footer -->
</div><!-- /page -->
页脚和页眉必须固定。这是工作,但我观察到一些内容很多的页面(更多的屏幕高),当我点击某个地方时,脚是隐藏的。事实上,它并没有隐藏,而是在屏幕底部移动。
如果现在,我在中间滚动并单击某个位置,标题和底部被隐藏。实际上,它不是 hidem,而是页眉向上移动到页面顶部,页脚向下移动。
最后,当我在页面底部滚动并再次单击时。页脚在那里,但页眉移动到顶部。
它并不是真正固定的,因为页眉和页脚不会停留在屏幕的顶部和底部,而是在单击后移动到页面底部或顶部。
有没有办法避免这样的问题?