为网站制作页脚我偶然发现了重叠Div的一些奇怪行为。您可以看到一个例子:链接不重叠Div
http://mike.latysheva.ru/test.html
的问题是,第二个环节是不是在IE7点击并且至少一些IE8的版本。在IE9和Firefox中运行良好。
下面是代码,这是很简单的(你可以看到完整的代码在页面的源代码):
<div style="height: 120px; width: 200px; background: #DDDDDD; postion:relative;">
<div style="height: 40px; padding: 10px;postion:relative;">
<a ...[have to remove an actual link in order to post it here]>Test Link 1</a>
</div>
<div style="height: 40px; padding: 10px;postion:relative;">
<a ...[have to remove an actual link in order to post it here]">Test Link 2</a>
</div>
</div>
<div style="width:250px;height:100px; background:#777777;margin-top:-60px;position:relative;z-index: -10;"></div>
有什么可以用错误的代码?它与z-index有什么关系:-10?我完全困惑...请帮助...
先谢谢您!
为什么不接受一个答案?像@ jaman's一样。 ;) – Kjuly