<td class="navStyle">
@Html.ActionLink(@Resources.Resources.Menu_Quote,"Index",
"Quote", new { area = "" },
new {@class = "navStyleImage_requestQuote navStyle" })
</td>
的CSS
.navStyle {
width:auto;
height:40px;
padding:0px 5px 0px 5px;
font-size:12pt;
color:#ceeff3;
text-decoration:none;
font-family:"Trebuchet MS", Helvetica, sans-serif;
vertical-align:top;
}
a.navStyleImage_requestQuote:hover {
background-image:url("images/Inovir_Navigation_GetAQuote.png");
background-position:bottom;
background-size:100%;
background-repeat:no-repeat;
text-decoration:none;
}
当我尝试将其传递通过文本时,我无法将背景图像降至文本下方
最佳答案
在您的CSS中,设置z-index属性
.backelement {
z-index:1;
}
.frontelement {
z-index:2;
}
堆栈索引较高的元素在堆栈索引较低的元素之前。