IE7 の z-index の操作に問題があります。私はたくさんの調査を行いましたが、まだ問題を解決できません。
私は持っている
4 buttons with drop down menu. The dropdown menu has absolute position and have z-index of 9999;
---- ---- ----- -----
| | | | | | | |
---- ---- ----- -----
dmenu dmenu dmenu dmenu
another 4 buttons with popup images that pop on top of the button. The images also have absolute position and have z-index of 9999;
pop img pop img pop img pop img
---- ---- ----- -----
| | | | | | | |
---- ---- ----- -----
I want dropdown menu will cover the buttons below and and pop images will cover the button above.
Chrome と FF ではすべて正常に動作しますが、IE では動作します。ドロップダウン メニューは、下のボタンを覆うのではなく、下のボタンの後ろに表示されます。
上のボタンはドロップダウン メニューの親で、下のボタンはポップ イメージの親です。
私が試してみました
1.上下のボタンの相対位置を設定します。
2.このスクリプトを実行します
var zIndexNumber = 1000;
// Put your target element(s) in the selector below!
$("div").each(function() {
$(this).css('zIndex', zIndexNumber);
zIndexNumber -= 10;
console.log($(this));
});
上記のスクリプトはドロップダウン メニューを修正して下のボタンを覆うようにしますが、ポップ イメージの z-index が低いため、上のボタンもポップ イメージを覆うようにします。
私は今とてもイライラしており、助けが必要です。本当にありがとう!