如何为Html.ActionLink()
设置图像背景?
我的代码:
@Html.ActionLink("Home", "Index", "Home", new {@data_transition = "slide"})
答案 0 :(得分:0)
您需要设置@class = "css-classname"
,
像这样:
@Html.ActionLink("Home",
"Index",
"Home",
new {@data_transition = "slide"},
new {@class="css-class-name"})
和.css
.css-class-name{
background-image: your image;
}