我想將黑色矩形(:after)放在h2之後,但z-index不起作用。:之後:z-index不起作用
我在HTML
<h2>Ce que tu auras peut-être un jour ou l'autre...</h2>
這個代碼,這在CSS:
#general .page h2 {
position: relative;
text-indent: -9999px;
width: 718px;
margin-bottom: 50px;
height: 116px;
z-index: 10;
background: url(img/banniere-hi-04.png);
}
#general .page h2:after {
display: block;
content: "";
position: absolute;
top: -15px;
left: 658px;
width: 544px;
height: 72px;
z-index: -1;
background: black;
}
這裏的問題(這裏用黑色矩形): http://www.robinmastromarino.be/dataviz04/
感謝您幫幫我 !
僞元素有位置嗎? – isherwood 2013-03-13 20:37:06
@isherwood:是的,他們會。 – 2013-03-13 20:37:29
然後我根本沒有任何幫助。 :-) – isherwood 2013-03-13 20:37:50