问问题
392 次
2 回答
2
您可以将所有样式放在一个类中,然后将类交给 ActionLink
@Html.ActionLink("דף הבית", "Index", "Home", null, new { id = "something", @class="something you give to anchor" }
例如
a,.anchorstyle{
text-decoration:none;
color:blue;
}
<a href="#">hello </a>
或者
<a class="anchorstyle" href="#">hello </a>
或将此类添加到 ActionLink
@Html.ActionLink("דף הבית", "Index", "Home", null, new { id = "something", @class="anchorstyle" }
于 2013-03-07T11:07:21.447 回答
1
@Html.ActionLink("דף הבית", "Index", "Home", null, new { id = "something", @class="someCssClass" }
或者
@Html.ActionLink("דף הבית", "Index", "Home", null, new { id = "something", @class="someCssClass", @style="color:white;" }
于 2013-03-07T11:07:09.550 回答