<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;
}
我无法将我的背景图像放在文本下方,当我试图将它推过文本时它会消失
答案 0 :(得分:0)
在CSS中,设置z-index属性
.backelement {
z-index:1;
}
.frontelement {
z-index:2;
}
堆栈索引较高的元素位于堆栈索引较低的元素前面。