IE版本是6.0時,代碼是象下面這樣:z索引不工作在IE
<div style="background-color: #4A840F; width:300px; height: 200px; position: relative;">
<div style="background-color: #ED4100; width:200px; height: 500px; position: absolute;z-index: 100;"></div>
</div>
<div style="background-color: red; width:300px; height: 200px; position: relative;"></div>
如果刪除了位置=相對的第三格,一切正常,但我不能因爲我需要它來修復另一個元素。但是,如果不刪除它,z-index在IE中不起作用。它適用於FF和Chrome。
有人可以幫我解決嗎?先謝謝你。
你有沒有嘗試給第三個div`zoom:1`? – sdleihssirhc 2011-02-01 03:30:29
只有「zoom:1」?我剛剛添加並嘗試,沒有任何影響。 – ywenbo 2011-02-01 03:32:44