Make Div Draggable using CSS

前端 未结 9 800
死守一世寂寞
死守一世寂寞 2020-12-07 22:26

I want to make my div tag with id \"drag_me\" to be draggable up to the length of 300px from left and 460px from top, only using CSS.

I also want to make it resizabl

9条回答
  •  情书的邮戳
    2020-12-07 23:27

    You can take a look at HTML 5, but I don't think you can restrict the area within you can drag it, just the destination:

    http://www.w3schools.com/html/html5_draganddrop.asp

    And if you don't mind using some great library, I would encourage you to try Dragula.

提交回复
热议问题