我一直在使用剃刀生成兩個文本區域,文本區的行和列的大小不一致在Chrome和Firefox
@Html.TextAreaFor(model => model.Description, new { autocomplete = "off", @cols = 25, @rows = 1, disabled = "disabled" })
@Html.TextAreaFor(model => model.Narration, new { autocomplete = "off", @cols = 25, @rows = 1 }),
導致如下的HTML,
<textarea autocomplete="off" cols="25" data-val="true" data-val-maxlength="The field Description must be a string or array type with a maximum length of '400'." data-val-maxlength-max="400" data-val-required="The Description field is required." disabled="disabled" id="Description" name="Description" rows="1">acknowledgement description</textarea>
<textarea autocomplete="off" cols="25" id="Narration" name="Narration" rows="1"></textarea>
生成的HTML代碼從剃刀是既在鉻和Firefox相同,但是文本區域的尺寸是不同的(167x17 px - Chrome , 204.667×36.15 px in Firefox
)
是否有任何方法來解決這個問題或缺少在我的代碼?