无法减小 Chrome 中可调整大小的文本区域的大小



我有一个文本区域:

<textarea cols="1" rows="1" style="width:500px; height:200px;"></textarea>

由于某种原因,在Chrome中使用鼠标光标调整大小时,我无法使其变小,尽管在Fifefox中它工作正常。我错过了什么?

你没有做错任何事,你的代码是正确的,但你在Chrome中遇到了一个错误:https://code.google.com/p/chromium/issues/detail?id=94583

它将您的 css 高度值视为最小高度值,这是一个至少存在 2 年

的错误

试试这个

<textarea cols="1" rows="1" style="width:auto; min-width:300px; height:200px; resize:both;"></textarea>

我认为在铬中,如果它设置,我们不能减少宽度。

最新更新