简体   繁体   English

如何上下拖动div滚动?

[英]How to drag a div up and down to scroll?

Instead of having a scroll bar, I want to be able to drag the div to scroll down. 我希望没有滚动条,而是可以拖动div向下滚动。

The div is a bar which contains the profile pictures of users online. div是一个包含在线用户个人资料图片的栏。
So far, I was only able to drag only one of the profile pictures. 到目前为止,我只能拖动其中一张个人资料图片。 I want to be able to drag either the profile pictures ( all at once ) or drag the div to scroll when it overflows. 我希望能够拖动个人资料图片(全部一次)或拖动div以在溢出时滚动。

PS I only want vertical scrolling and both jquery or javascript is fine with me PS我只想要垂直滚动和jQuery或JavaScript都适合我

This may be useful for you : http://the-taylors.org/jquery.kinetic/ 这可能对您有用: http : //the-taylors.org/jquery.kinetic/
jQuery.kinetic is a simple plugin which adds smooth drag scrolling jQuery.kinetic是一个简单的插件,可添加平滑的拖动滚动

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM