问题
I'm curious, is it possible to use multiple CSS classes on an ActionLink in MVC3 Razor syntax? The line below appears to load only the first class(btn) and skipps btn_c.
@Html.ActionLink("Administration", "Index", "Admin", null, new { @class = "btn btn_c" })
回答1:
I've just used your existing ActionLink with the following css:
.btn
{
color: yellow;
}
.btn_c
{
background-color: red;
}
And it successfully produced the following output:
来源:https://stackoverflow.com/questions/8465133/actionlink-with-multiple-classes-in-asp-net-mvc3