0
<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;
}

我无法让我的背景图像下降到文本下方,当我尝试推动它传递文本时它消失了

4

1 回答 1

0

在您的 CSS 中,设置 z-index 属性

.backelement {
     z-index:1;
}

.frontelement {
     z-index:2;
}

具有较高堆栈索引的元素位于具有较低堆栈索引的元素之前。

于 2013-09-27T22:53:50.907 回答