How can I resize a DIV by dragging just ONE side of it?

前端 未结 9 2267
后悔当初
后悔当初 2020-12-12 17:38

Let me be more specific... I don\'t want the DIV to resize WHILE I\'m dragging. I want to drag it out (and maybe a vertical line follows my cursor) and when I release, it re

9条回答
  •  醉酒成梦
    2020-12-12 18:06

    There is a much simpler way to achieve this. CSS 3 has a resize property to make an html element resizeable, while following other CSS properties like min/max widths etc.

    .resizeable {
      resize: both;
      overflow: auto;
      border: 2px solid black;
    }
    

提交回复
热议问题