Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何<select>在代码中为 HTML 设置 height 属性。
<select>
我尝试设置.Attribute.Add("Style","Height:120px")只是为了看看我是否可以改变它,但无济于事。
.Attribute.Add("Style","Height:120px")
更好的是,给它一个 CssClass。:)
样式已经是一个属性...
DropDownList myDropDown; myDropDown.Style["height"] = "120px";