Html 试图从 textarea 中删除可调整大小

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12767438/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 03:12:47  来源:igfitidea点击:

Trying to remove resizable from textarea

htmlcss

提问by Gandalf StormCrow

Possible Duplicate:
How to disable resizable property of TextArea?
How to disable the resize grabber of an HTML <textarea>?

可能的重复:
如何禁用 TextArea 的可调整大小的属性?
如何禁用 HTML <textarea> 的调整大小抓取器?

I've inherited a website to maintain and I'm not able to remove the textarea to be resizable or at least to remove the resizable "flag". Here is what I mean :

我继承了一个要维护的网站,但我无法删除可调整大小的 textarea 或至少删除可调整大小的“标志”。这就是我的意思:

enter image description here

在此处输入图片说明

How can I remove this? it's not problem if it's resizable the problem is this icon showing that it is.

我怎样才能删除它?如果它可以调整大小,这不是问题,问题是这个图标表明它是。

回答by Mr. Alien

You need to use resizeproperty to prevent the textareato be resized.

您需要使用resize属性来防止textarea调整大小。

Demo

演示

textarea {
   resize: none;
}


resizeproperty also takes values like verticaland horizontalto resize the textareahorizontally only, or vertically only.

resize属性也采用像vertical和 之类的值horizontaltextarea仅水平调整大小,或仅垂直调整大小。

For Vertical only

仅适用于垂直

textarea { 
   resize:vertical; 
}

For Horizontal only

仅用于水平

textarea { 
   resize:horizontal; 
}