如何覆盖TextBoxFor字段的CSS?

use*_*759 1 html css asp.net-mvc html.textbox html.textboxfor

在Site.css中有以下类:

input[type="textbox"].TextBoxAsLabel {
     background:#f2f3f3  !IMPORTANT;
}
Run Code Online (Sandbox Code Playgroud)

想要覆盖Edit.cshtml中TextBoxFor字段的默认背景

@Html.TextBoxFor(model => model.ClientNumber, new {@readonly = "readonly", @class = "TextBoxAsLabel"})
Run Code Online (Sandbox Code Playgroud)

它仍然使用默认的白色背景.我应该改变什么?

SLa*_*aks 6

没有input[type="textbox"].
你的意思text.