乐闻世界logo
搜索文章和话题

How to disable the resize grabber of textarea

3个答案

1
2
3

You can simply use resize: none.

css
textarea { resize: none; }

You can also choose to adjust the textarea only horizontally or vertically, as shown below:

css
textarea { resize: vertical; }
css
textarea { resize: horizontal; }

Finally, resize: both enables the resize handles.

2024年6月29日 12:07 回复

Example of a Textarea with Resize Disabled

html
<textarea class="foo"></textarea> <style> textarea.foo { resize:none; } </style>
2024年6月29日 12:07 回复
html
<textarea style="resize:none" name="name" cols="num" rows="num"></textarea> ``` Just an example
2024年6月29日 12:07 回复

你的答案