问题
I know it's possible to disable the resize of a textarea by using:
textarea {
resize: none;
}
But is it possible to disable either x or y? instead of both
回答1:
resize: vertical;
or
resize: horizontal;
Quick fiddle: http://jsfiddle.net/LLrh7Lte/
回答2:
Sure it is possible with css and jquery
CSS:
resize: vertical;
resize: horizontal;
jQuery
$('textarea').css("resize", "vertical");
$('textarea').css("resize", "horizontal");
Bootstrap just put the class in Textarea
for the vertical resize: vresize
for the horizontal resize: hresize
来源:https://stackoverflow.com/questions/25567707/textarea-disable-resize-on-x-or-y