Js realizes that the scroll bar in the div scrolls when you hold down the mouse.

if you want to use js to implement in a div with scroll bars, press and hold the right mouse button, and then swipe the mouse up or down or left or right, and the scroll bars in the div will scroll along. And will not box the content in the div.

found a plug-in called dragscroll.js on git, but it doesn"t work well when used with vue, so it can"t achieve this effect stably.

is there any good way to realize it?

the following figure takes Tower as an example to show the scrolling effect of the scroll bar in div when he moves with the mouse down.

Oct.08,2021
Menu