如何将文本区域的默认大小与最小大小分开设置?

How do I set the default size of a textarea separately from the minimum size?

设置HTML文本区域大小的方法有两种:rowscols属性HTML,heightheight width 个属性在 CSS 中。不幸的是,这些设置了首次加载页面时文本区域的默认大小,以及用户通过在页面上调整它的大小可以获得的最小大小。如何为这些设置不同的尺寸?

您的文本区域必须使用最小宽度和最小高度。

<textarea rows="4" cols="10" id="myTextArea">Welcome to Whosebug</textarea>

在css中使用:

#myTextArea {
    min-width: 50px;
    min-height: 60px; 
}