更改尺寸的不工作:(如何更改MVC中textBox的大小?
@Html.TextBox("Imie", new { @class = "boxx" })
的CSS:
.boxx{
height : 400px;
width : 500px;
}
the class = "boxx" is wrote in textBox
更改尺寸的不工作:(如何更改MVC中textBox的大小?
@Html.TextBox("Imie", new { @class = "boxx" })
的CSS:
.boxx{
height : 400px;
width : 500px;
}
the class = "boxx" is wrote in textBox
看一看at the docs(或智能感知),你会看到可用重载 尝试
@Html.TextBox("Imie", null, new { @class = "boxx" })
你可以尝试下面的代码:
@Html.TextBox("Imie", null, new { @class = "boxx" })
第3个值为HTML
属性。
希望它解决了您的问题。
感谢
,你也可以尝试内联CSS,如果你想
@Html.TextBox(x => x.testBox, new { style = "width: 20px;" })