在文本区域中,右下角有一个小图钉,允许用户调整框的大小,我如何只用一个反应文件来摆脱它?

In the textarea there's a small pin on the bottom right corner that allows users to resize the box, how do i get rid of it with only a react file?

我正在用 React 制作一个表单,我需要一个文本区域 'fill' 以包含来自用户的一些信息。尽管它被限制为 255 个字符,但我想限制它不能被用户调整大小。我该怎么做?

看看下面的link:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea

  • 在HTML中,你可以这样写<textarea maxlength="255"></textarea>
  • 您可以像这样设置文本区域的样式:textarea { resize: none; } 以防止调整框的大小。

你不需要 React。