Make Div Draggable using CSS

前端 未结 9 783
死守一世寂寞
死守一世寂寞 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:04

    CSS is designed to describe the presentation of documents. It has a few features for changing that presentation in reaction to user interaction (primarily :hover for indicating that you are now pointing at something interactive).

    Making something draggable isn't a simple matter of presentation. It is firmly in the territory of interactivity logic, which is handled by JavaScript.

    What you want is not achievable.

提交回复
热议问题