使用 jQueryMobile,我在标记中包含了 data-role="footer"data-position="fixed"
,但仍然存在两个错误:
- 页脚在空点击事件上切换。
- 页脚未固定,并且隐藏了部分页面内容。
我正在使用 iPhone 3g 进行测试。有什么想法吗?
提前致谢。
UPDATE:似乎点击事件修改了当前页面的页脚,并将ui-fixed-overlay
更改为ui-fixed-inline
>,当然其样式为 display:none
以防止其他页面的页脚出现。
如何防止这种修改?
最佳答案
如果使用 1.1 或更高版本,请将 data-tap-toggle="false"
添加到页眉和页脚,如 documented here .
如果您使用的是 jQuery Mobile 1.1 之前的版本,请在加载 jQuery Mobile 之前放置以下内容:
$(document).bind("mobileinit", function(){
$.mobile.touchOverflowEnabled = true;
}); // remove
关于javascript - 如何修复 jQuery Mobile 的固定页脚?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4377062/