我已經在看CSS: How to make background-image above background-color in a list並嘗試!important
屬性,但沒有成功。CSS:如何將背景圖像放在前面?
我有this示例頁面,我想將黃色書封面作爲背景圖片放在下面的導航欄的前面。
我使用的代碼如下:
.home-link {
background: url(http://www.mensch-jinn-dajjal.net/wp-content/uploads/2013/12/Buchtitel.gif) no-repeat !important;
background-size: 180px 200px !important;
background-position: 400px 80px !important;
z-index: 99999 !important;
}
任何想法,爲什麼不來面呢?
我也嘗試給導航欄分配一個負Z指數而沒有成功。
謝謝馬尼什。在這種情況下,我發現你的解決方案最好。添加一個單獨的'
'標籤完美,並且是一個很好的解決方法。 –
orschiro