html - 如何删除文本区域右下角的调整大小选项?

标签 html css textarea

我正在尝试删除 textarea 中右下角的点。

这是我的意思的一个例子(来自 Chrome):
example

如何去除那些对 Angular 线?

最佳答案

只需在您的 CSS 文件中添加

textarea { resize: none; }

后期(2019 年)编辑: 与我的这个答案以及关于 resize: none 声明应用于 textarea 元素的 GitHub 代码搜索结果数量的增加相关,我写了一些关于为什么我认为 CSS resize none在 textarea 上不利于用户体验:

Very often, the textarea is limited to a number of rows and columns or it has fixed width and height defined via CSS. Based solely on my own experience, while answering to forums, writing contact forms on websites, filling live chat popups or even private messaging on Twitter this is very frustrating.

Sometimes you need to type a long reply that consists of many paragraphs and wrapping that text within a tiny textarea box makes it hard to understand and to follow as you type. There were many times when I had to write that text within Notepad++ for example and then just paste the whole reply in that small textarea. I admit I also opened the DevTools to override the resize: none declaration but that’s not really a productive way to do things.

from https://catalin.red/css-resize-none-is-bad-for-ux/

因此,在将上述内容添加到样式表之前,您可能需要检查一下。

关于html - 如何删除文本区域右下角的调整大小选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6340545/

相关文章:

javascript - onclick 事件处理程序不起作用

css - 谷歌地图在 Chrome 上缺少一排图 block

html - 如何阻止此 <li> 崩溃?

ios - iPad 上的 Webkit 溢出滚动触摸 CSS 错误

javascript - 文本区域颜色值

jquery - 滚动响应 Bootstrap 中的固定 header 损坏?

javascript - 找到 child H3 并检查是否有值(value)

jquery - 按钮点击计数-重置和重复

javascript - 将 HTML 文本区域值转换为 jqmath 公式

javascript - 在加载时设置 JavaScript 中多个文本区域元素的高度