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 に答える