div resizable like text-area

后端 未结 2 848
暖寄归人
暖寄归人 2020-12-14 13:52

Browsers allow text-areas to be re-sized by dragging their corner by default. I was wondering if this rule could be applied to other elements (a div for instance). I know th

2条回答
  •  [愿得一人]
    2020-12-14 14:30

    Use the css3 resize property.

    div {
        resize: both;
    }
    

    There is also a resize: horizontal and resize: vertical.


    Not currently cross browser http://caniuse.com/#feat=css-resize

提交回复
热议问题