How to implement a drag-and-drop div from scratch with JavaScript?

前端 未结 8 724
孤独总比滥情好
孤独总比滥情好 2020-12-08 05:07

It should be a combination of CSS and JavaScript. The steps to do should be:

  1. Make it on top of all other elements (which property to specify?)
  2. Catch t
8条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 05:23

    Yeah, you can use jQuery if you want a bloated library with far more functions than you need! Or if you want to be more of an elitist, use Waltern Zorn's drag and drop library, which is one tenth of the size.

提交回复
热议问题