2013-03-07 44 views
1

我有我下载了一个CSS,它有一个美丽的菜单与造型的链接,hover荷兰国际集团等HTML,CSS - 如何转移<a>风格ActionLink的

因为我在MVC开发,我使用

@Html.ActionLink("דף הבית", "Index", "Home", null, new { id = "something" } 

我很困惑在CSS中做了什么菜单。 我如何理解它,并“翻译”,所以它适用于HTML.ActionLink,而不是

<a href="#"><span class="l"></span><span class="r"></span><span class="t">Menu Item</span></a> 

回答

1
@Html.ActionLink("דף הבית", "Index", "Home", null, new { id = "something", @class="someCssClass" } 

OR

@Html.ActionLink("דף הבית", "Index", "Home", null, new { id = "something", @class="someCssClass", @style="color:white;" } 
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" }