Html CSS在MVC下拉菜单中不起作用

Html CSS在MVC下拉菜单中不起作用,html,css,asp.net-mvc,twitter-bootstrap,Html,Css,Asp.net Mvc,Twitter Bootstrap,我是ASP.NETMVC的初学者。我正在添加下拉菜单,但CSS不能正常工作。我怎样才能修好它?这是我的代码: @Html.DropDownListFor(m => Model.Fields[i], new SelectList(Model.attrs[i].atributeDetails, "AtributeDetailId", "AtDetailVal", int.Parse(Model.Fields[i])), " ", new { Class = "form-control",

我是ASP.NETMVC的初学者。我正在添加下拉菜单,但CSS不能正常工作。我怎样才能修好它?这是我的代码:

  @Html.DropDownListFor(m => Model.Fields[i], new SelectList(Model.attrs[i].atributeDetails, "AtributeDetailId", "AtDetailVal", int.Parse(Model.Fields[i])), " ", new { Class = "form-control", disabled = "disabled",style = "width:575px;height:25px;font-size:small;" })

如果您是说与“form control”类关联的样式不起作用,那么可能是因为“class”单词需要小写。我通常使用
@class=“my class”
。因此,不妨尝试以下方法:

@Html.DropDownListFor(m => Model.Fields[i], new SelectList(Model.attrs[i].atributeDetails, "AtributeDetailId", "AtDetailVal", int.Parse(Model.Fields[i])), " ", new { @class = "form-control", disabled = "disabled",style = "width:575px;height:25px;font-size:small;" })

是“style”标记中的样式不起作用还是与“form control”类相关联的样式不起作用?它不起作用我该怎么做?诸如“不能正确工作”之类的短语非常模糊。实际的结果是什么?你期望的结果是什么?