这就是我想要做的:
我想创建一个无论屏幕大小如何都贴在用户屏幕底部的页脚。但是当用户滚动时,我希望能够在用户向下滚动时将标题从固定更改为作为页面的一部分向下移动。我是 JS 新手,但我尝试过一些事情,例如:
 $(document).bind('mousewheel DOMMouseScroll MozMousePixelScroll', function (e) {
                var theEvent = e.originalEvent.wheelDelta || e.originalEvent.detail * -1;
                if (theEvent / 120 > 0) {
                    if ($(window).scrollTop() == 0) {
                        $("#content_under_fixed_footer").hide();
                    }
                }
                else {
                    if ($(window).scrollTop() < $(document).height() - $(window).height()) {
                        $("#content_under_fixed_footer").fadeIn(2000);
                        $(".fixed_header").css("position", "relative");
                    }
                }
            });
如果我使用上面的脚本,触发器是不对的。如果用户有一个大屏幕,则没有滚动,但如果窗口被缩短,它相对运作良好。请帮助我今天需要提交这个,我会尝试任何解决方案。谢谢!