我无法将背景图像放在文本下方

I cannot get the background image to drop below text

本文关键字:文本 图像 背景      更新时间:2023-09-26
<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 索引属性

.backelement {
     z-index:1;
}
.frontelement {
     z-index:2;
}
具有

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