在我看来,我有一个名为 Description 的文本区域字段。我希望增加该字段的大小。
我的代码
<div class="col-sm-3">
<div class="form-group">
<span style="color: #f00">*</span>
@Html.LabelFor(model => model.Description, new { @class = "control-label" })
@Html.TextAreaFor(model => model.Description, new { @class = "required", style = " rows=10, columns=40" })
@Html.ValidationMessageFor(model => model.Description)
</div>
</div>
我的文本区
我想像下图中提到的那样带来
所以我在 textarea 字段中给出了行和列。它增加了文本区域的大小。但是当我将页面缩小到手机大小时,意味着所有字段都缩小了。但是这个 textarea 字段不会缩小到页面大小。这是问题
我一直在验证我的领域。我想用红色显示该验证。我正在使用模型验证。
原文由 Susan 发布,翻译遵循 CC BY-SA 4.0 许可协议
试试这个: