Position: absolute a div over Flash

2019-07-07 00:53发布

问题:

Is it possible to position: absolute a <div /> over a Flash banner without adding wmode="transparent" to the banner?

I have a lightbox that needs to appear above my ads but I can't directly modify the banners as they come from a third party.

Edit: The problem mainly occurs in IE where the Flash banner is shown above the lightbox.

回答1:

No it's not but you can just hide the banners when the lightbox is active.



回答2:

I am afraid no, if this was the case, we wold not have resorted to wmode="transparent", but i hope there is a way around it.



回答3:

I haven't tested this, but you could try the iFrame hack you would apply for IE to show an absolute div over a select element. It consists of dynamically (or even hard-coded, why not) creating an iFrame container that you position above the Flash (in your case) with the lightbox content inside it.

Someone correct me if they tested and does not apply here, but even if it does, I wouldn't recommend it unless it's a life or death situation.



回答4:

set the wmode="transparent" attrobute using javascript ??

Jquery

$(document).ready(function() {  
    $('.flash_container embed').attr('wmode', 'transparent');  
});


回答5:

try

wmode="opaque"
i think this will allow html div to be displayed over flash. It works for me many times but it behaves differently in different browsers.