开发者

Why is z-index not working even on a positioned element?

开发者 https://www.devze.com 2023-02-04 10:04 出处:网络
I am learning to create pure CSS3 ribbons I have .dialog h1 { position: relative; z-index: 10; } .dialog h1:before, .dialog h1:after {

I am learning to create pure CSS3 ribbons

I have

.dialog h1 {
    position: relative;
    z-index: 10;
}

.dialog h1:before, .dialog h1:after {
   position: absolute;
   z-index: -10;
}

but my CS开发者_如何学运维S triangles (.dialog h1:before/after) are still shown in front of the h1. why is that?

http://jsfiddle.net/w9Hqd/2/

Why is z-index not working even on a positioned element?


see http://jsfiddle.net/w9Hqd/3/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号