如何删除文本区域右下角的调整大小选项? [英] How to remove resize option present at the right bottom-corner of the textarea?

查看:94
本文介绍了如何删除文本区域右下角的调整大小选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试删除文本区域中位于右下角的点。

I'm trying to remove dots in a textarea which are present at the bottom-right corner.

以下是我的意思的示例(来自Chrome):

Here's an example of what I mean (from Chrome):

如何删除那些对角线?

How to remove those diagonal lines?

推荐答案

只需添加 CSS 文件

textarea { resize: none; }

后来(2019)编辑:
与我的这个答案以及GitHub代码搜索的数量增加有关 resize的结果:没有声明应用于 textarea 元素,我写了几行关于为什么我认为CSS在< textarea 对UX不利:

Later (2019) edit: Related to this answer of mine and the rising number of GitHub code search results on resize: none declarations applied to textarea elements, I wrote some lines on why I think CSS resize none on textarea is bad for UX:


很多时候,textarea限于行和列的数量或者它具有通过CSS定义的固定宽度和高度。仅基于我自己的经验,在回答论坛,在网站上写联系表,填写实时聊天弹出窗口或什至在Twitter上发送私人消息时,这非常令人沮丧。

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.

有时您需要输入由许多段落组成的冗长答复,并将该文本包装在一个很小的textarea框中,使您在键入时难以理解和关注。例如,很多时候我不得不在Notepad ++中编写该文本,然后将整个答复粘贴到该小的文本区域中。我承认我还打开了DevTools来覆盖调整大小:没有声明,但这并不是一种有效的处理方式。

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.

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

因此,您可能需要先检查一下,然后再将以上内容添加到样式表中。

So you might want to check this out before adding the above to your stylesheets.

这篇关于如何删除文本区域右下角的调整大小选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆