gpt4 book ai didi

javascript - 使用鼠标滚轮水平滚动页面

转载 作者:行者123 更新时间:2023-12-02 19:24:31 25 4
gpt4 key购买 nike

我正在使用本教程(鼠标滚轮插件和脚本)制作水平滚动页面:

http://css-tricks.com/snippets/jquery/horz-scroll-with-mouse-wheel/

滚动可以在 chrome 上工作,但不能在 firefox 上工作,在教程中它也不能在 firefox 上工作,有什么解决办法吗?

$(function() {
$("body").mousewheel(function(event, delta) {
this.scrollLeft -= (delta * 30);
event.preventDefault();
});
});

最佳答案

http://cobbweb.me/blog/2012/03/30/jquery-mousewheel-plugin-version-2/

这个插件可能会帮助您在 Firefox 中实现鼠标滚轮滚动。

关于javascript - 使用鼠标滚轮水平滚动页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12183627/

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