admin管理员组文章数量:1391974
How would I let a user resize a div? I would like them to be able to grab the side of it and pull it, I DO NOT want CSS Resize property. The Resize property makes the part you drag to make it bigger in the corner. So how would I let a user make a div bigger by grabbing the side?
How would I let a user resize a div? I would like them to be able to grab the side of it and pull it, I DO NOT want CSS Resize property. The Resize property makes the part you drag to make it bigger in the corner. So how would I let a user make a div bigger by grabbing the side?
Share Improve this question edited Feb 19, 2015 at 23:05 ZEE 5,8794 gold badges39 silver badges54 bronze badges asked Feb 19, 2015 at 21:56 michael jonesmichael jones 7401 gold badge8 silver badges17 bronze badges 1- 2 you may want to add javascript to your question tags – Justin Breiland Commented Feb 19, 2015 at 21:59
1 Answer
Reset to default 3If you don’t want to use the resize
property, there’s no other option to do this with CSS. However, you can achieve this with JavaScript.
There are libraries that support this, e.g. jQuery UI: http://jqueryui./resizable/
Of course, it’s also possible to do this in plain JavaScript. However, it’s tricky due to differences in the browser’s implementations. How to make HTML element resizable using pure javascript? might be a good starting point.
本文标签: javascriptHow to resize div with CSS by the borderStack Overflow
版权声明:本文标题:javascript - How to resize div with CSS by the border - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744671189a2618833.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论