在Safari中隐藏textarea调整大小控制柄 [英] Hiding textarea resize handle in Safari

查看:156
本文介绍了在Safari中隐藏textarea调整大小控制柄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用textarea组件,并且我动态地控制它们的高度。随着用户键入,只要有足够的文本,高度就会增加。这在IE,Firefox和Safari上正常工作。

I'm using textarea components in my application, and I control their height dynamically. As the user types, the height is increased whenever there is enough text. This works fine on IE, Firefox, and Safari.

但是,在Safari中,右下角有一个手柄工具,允许用户通过点击和拖动来调整textarea的大小。我也注意到textarea在stackoverflow问问题页面的这个问题。这个工具混乱,基本上阻碍了。

However, in Safari, there is a "handle" tool in the lower right that allows user to resize the textarea by clicking and dragging. I also noticed this issue with the textarea in the stackoverflow Ask a Question page. This tool is confusing and basically gets in the way.

那么,有没有隐藏这个调整大小的句柄?

So, is there anyway to hide this resize handle?

(我不知道handle是否正确,但我不能想出更好的术语。)

(I'm not sure if "handle" is the right word, but I cannot think of a better term.)

推荐答案

您可以使用CSS覆盖调整大小行为:

You can override the resize behaviour with CSS:

textarea
{
   resize: none;
}

或只是简单

<textarea style="resize: none;">TEXT TEXT TEXT</textarea>

有效属性包括:horizo​​ntal,vertical,none

Valid properties are: both, horizontal, vertical, none

这篇关于在Safari中隐藏textarea调整大小控制柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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