使用Jquery水平拖动网站页面
How can i achieve a dragable background like the bg of the site below using jquery?
I found something very close,a jquery plugin here. But it doesn't have option to drag. What will be the
best way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有一个 jQuery 插件可以帮助您构建这些:
http://plugins.jquery.com/project/dragscroller< /a>
但理论上,如果你想自己做,你必须监听 mouseDown,然后,当它处于活动状态时,监听 x 轴上的 mouseMovement 进行滚动(使用例如 jQuery.scrollLeft() 和 mouseUp 来结束事件链。
There's a jQuery-plugin that helps you build these:
http://plugins.jquery.com/project/dragscroller
But in theory, if you want to do it yourself, you would have to listen for the mouseDown, then, while that is active, listen for the mouseMovement on the x-axis to scroll (with jQuery.scrollLeft() for example) and mouseUp to end the event-chain.
这是一种滑动功能。我会研究一下 JQuery Mobile。
It's sort of swipe functionality. I would look into JQuery Mobile.