Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何设置图像背景Html.ActionLink()?
Html.ActionLink()
我的代码:
@Html.ActionLink("Home", "Index", "Home", new {@data_transition = "slide"})
你需要设置@class = "css-classname",像这样:
@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; }