允许文本区域在左下角重新调整大小。

时间:2021-01-07 21:25:48

Can I get the small re-size widget that appears in the lower right of text areas (on modern browsers) to appear on the lower left?

我能让出现在文本区域右下角(现代浏览器上)的小的重新大小的小部件出现在左下角吗?

3 个解决方案

#1


2  

CSS3 adds a "resize" property that allows you to control whether the textarea is resizable. But as far as I can tell, there's no property that specifies where the handle is. If you want that level of control, you'll have to implement the widget yourself with Javascript (similar to the way the jQuery Dialog widget adds a resize handle to the DIV it creates).

CSS3添加了一个“调整大小”属性,允许您控制文本区域是否可调整大小。但就我所知,没有属性指定句柄在哪里。如果您想要这种级别的控制,您必须自己使用Javascript实现小部件(类似于jQuery对话框小部件向它创建的DIV添加大小调整句柄的方式)。

#2


5  

You can do that by setting writing direction to right-to-left. This implies that text is aligned to the right by default, but this can easily be overridden:

你可以通过将书写方向从右到左来实现。这意味着文本默认是向右对齐的,但这很容易被覆盖:

textarea { resize: both; direction: rtl; text-align: left; }

There are other side effects that you cannot override. The vertical scroll bar will appear on the left. The cursor will appear at the left at times (after typing in a directionally neutral character), even characters will appear on the right when typing only left-to-right characters intermixed with neutral characters – though directionally neutral characters first appear at the left (test with typing “abc (1) x” to see what I mean).

还有一些副作用是你无法克服的。垂直滚动条将出现在左边。光标会出现在左边有时(输入后定向中性性格),甚至人物时将出现在右边输入只从左到右的字符与中性人物混杂在一起——尽管定向中性人物第一次出现在左边(测试输入“abc(1)x”,明白我的意思)。

So it comes with features that are oddities when typing left-to-right text, and it’s better to look for a different approach to the original problem (whatever it was that made you want to put the resize handle in the lower left corner).

因此,在键入从左到右的文本时,它具有一些奇怪的特性,最好是寻找与原始问题不同的方法(不管它是什么使您想在左下角设置resize句柄)。

#3


0  

That's not meant to be done, because then the standard of textareas would be very inconsistent and that's what the W3C tries to avoid. The internet should be consistent in some things and the resizing widget of the html textarea element will most likely always be on the right. One thing you can do is use jQuery or other JavaScript techniques to add a resizing widget in the bottom left and cover the one in the bottom right.

这并不是注定要做的,因为那样的话,textarea的标准就会非常不一致,这也是W3C试图避免的。internet在某些方面应该是一致的,html textarea元素的调整小部件很可能总是在右边。您可以使用jQuery或其他JavaScript技术在左下角添加调整小部件,并覆盖右下角的小部件。

#1


2  

CSS3 adds a "resize" property that allows you to control whether the textarea is resizable. But as far as I can tell, there's no property that specifies where the handle is. If you want that level of control, you'll have to implement the widget yourself with Javascript (similar to the way the jQuery Dialog widget adds a resize handle to the DIV it creates).

CSS3添加了一个“调整大小”属性,允许您控制文本区域是否可调整大小。但就我所知,没有属性指定句柄在哪里。如果您想要这种级别的控制,您必须自己使用Javascript实现小部件(类似于jQuery对话框小部件向它创建的DIV添加大小调整句柄的方式)。

#2


5  

You can do that by setting writing direction to right-to-left. This implies that text is aligned to the right by default, but this can easily be overridden:

你可以通过将书写方向从右到左来实现。这意味着文本默认是向右对齐的,但这很容易被覆盖:

textarea { resize: both; direction: rtl; text-align: left; }

There are other side effects that you cannot override. The vertical scroll bar will appear on the left. The cursor will appear at the left at times (after typing in a directionally neutral character), even characters will appear on the right when typing only left-to-right characters intermixed with neutral characters – though directionally neutral characters first appear at the left (test with typing “abc (1) x” to see what I mean).

还有一些副作用是你无法克服的。垂直滚动条将出现在左边。光标会出现在左边有时(输入后定向中性性格),甚至人物时将出现在右边输入只从左到右的字符与中性人物混杂在一起——尽管定向中性人物第一次出现在左边(测试输入“abc(1)x”,明白我的意思)。

So it comes with features that are oddities when typing left-to-right text, and it’s better to look for a different approach to the original problem (whatever it was that made you want to put the resize handle in the lower left corner).

因此,在键入从左到右的文本时,它具有一些奇怪的特性,最好是寻找与原始问题不同的方法(不管它是什么使您想在左下角设置resize句柄)。

#3


0  

That's not meant to be done, because then the standard of textareas would be very inconsistent and that's what the W3C tries to avoid. The internet should be consistent in some things and the resizing widget of the html textarea element will most likely always be on the right. One thing you can do is use jQuery or other JavaScript techniques to add a resizing widget in the bottom left and cover the one in the bottom right.

这并不是注定要做的,因为那样的话,textarea的标准就会非常不一致,这也是W3C试图避免的。internet在某些方面应该是一致的,html textarea元素的调整小部件很可能总是在右边。您可以使用jQuery或其他JavaScript技术在左下角添加调整小部件,并覆盖右下角的小部件。