如何解决CSS3使用:after和:before阴影,由z-index引起的问题

问题的答案非常简单:

 

#parent { position: relative; z-index: 1; }
#pseudo-parent { position: absolute; } /* no z-index allowed */
#pseudo-parent:after { position: absolute; z-index: -1; }

 

具体参考:

http://stackoverflow.com/a/9072467

 

posted @ 2014-08-13 16:23  DenniGuo  阅读(1339)  评论(0编辑  收藏  举报