gpt4 book ai didi

jquery - 让我的 ListView 滚动而不是消失在页脚后面

转载 作者:行者123 更新时间:2023-12-01 05:58:12 24 4
gpt4 key购买 nike

这就是我目前正在做的事情:/image/GjiAt.png

基本上,它是一个使用 jQuery 和一些 AJAX 来访问 Web 服务的列表,该 Web 服务访问数据库并根据用户在上一个菜单中的选择来提取相应的狗。

这是针对移动应用程序的,我希望能够向上/向下滚动列表,同时将页眉/页脚保持在各自的位置。

相关代码如下:

列表:

<div ID="dogs" style="text-align:center;width:100%;overflow:auto ">

页脚:

<div data-role="footer" id="footer" class="footer" style="background: url('images/footer.png');width:100%;height:87px;">
footer {position: absolute; bottom: 0; z-index: 1;}

现在,在研究中我发现在使用 touchOverflow 之前,我必须添加以下内容:

<script> $(document).bind("mobileinit", function(){ $.mobile.touchOverflowEnabled = true; }); </script>

我有过,但没有运气。所以在我看来,我要么需要施展一些 CSS 魔法,要么 jQuery 为我提供了其他东西。无论哪种方式,我都希望得到您的帮助!

谢谢!

最佳答案

尝试在页脚上添加position:fixed

关于jquery - 让我的 ListView 滚动而不是消失在页脚后面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13421882/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com