给textarea 设置css .
resize: both; //纵横拉伸
resize: horizontal; //水平拉伸
resize: vertical; // 垂直拉伸
resize: none; // 禁止拉伸
CSS:
textarea {
resize: none; /* Disables resizability */
}
HTML:
<textarea>Type some text here.</textarea>
参考连接:
https://developer.mozilla.org/en-US/docs/Web/CSS/resize
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea