2013-03-07 29 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" }