开发者

z-index and anchor tag

I have a div with position relative and z-index :-1. and I have placed <A> over that div. But it seems <a> is not working when i give postion :relative to its parent. when change that position to absolute it starts working. Could anybody tell me why this is happening. I want that link 开发者_如何学JAVAto work and as far as possible need to keep its parent div position :relative and z-index:-1;


position:relative will make the z-index relative to the parent.

http://www.w3.org/TR/CSS21/visuren.html#propdef-z-index


Negative z-index cause a links to not work:

See this fiddle

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜