【发布时间】:2010-10-22 08:33:26
【问题描述】:
我一直在尝试通过为链接 (a) 添加 CSS 类并使用背景图像将链接显示为图像来在 HTML.ActionLink 上设置图像。这适用于所有浏览器,但 IE 6 和 IE7 除外。我需要让它在这些浏览器中工作,但无法弄清楚。有什么想法???
a.edit
{
background-image: url("../Images/Buttons/edit.png");
background-position: top left;
background-repeat: no-repeat;
width:49px;
height:22px;
display: inline-table;
text-decoration:none;
clear:none;
}
a:hover.edit
{
background-image: url("../Images/Buttons/editOn.png");
background-position: top left;
background-repeat: no-repeat;
}
还有编辑 CSS 类的链接
<%= Ajax.ActionLink(" ", "EditClaim", "Driver", new { claimId = item.Id }, new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "claim", OnSuccess="showAddClaim", OnComplete = "updateClaim"}, new { @class = "edit" })%>
如果有人能帮我解决这个问题,我将不胜感激。我花了很长时间试图解决这个问题!
谢谢
【问题讨论】:
标签: css asp.net-mvc image