0

如何设置图像背景Html.ActionLink()

我的代码:

@Html.ActionLink("Home", "Index", "Home", new {@data_transition = "slide"})
4

1 回答 1

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;
}
于 2012-09-05T09:40:24.293 回答