Div on top of flash without wmode
I have an AD which is basic开发者_StackOverflow中文版ally a flash file inside an IFRAME. Unfortunately, I cannot control the wmode of the flash file.
Is there any way in which I can place the div on top of the flash?
UPDATE: How does Wibiya (wibiya.com) do it then?
You could try using an iframe cut-out hack which is supported in many browsers for backwards compatibility reasons.
http://neugierig.org/software/chromium/notes/2009/07/windowed-windowless-plugins.html
Add an absolutely positioned empty iframe with the proper dimensions that acts as a mask wherever you want the underlying HTML to "bleed-through". That's probably how Wibiya is doing it, although I haven't taken a look.
Closure provides a helper class to do this type of thing if you're looking for inspiration: http://code.google.com/p/closure-library/source/browse/trunk/closure/goog/ui/iframemask.js
Nope. Windowless objects are rendered on a different "plane" to windowed objects (such as ActiveX controls, in the case of IE). Microsoft's explanation obviously applies only to Internet Explorer, but other browsers appear to work in a similar way.
All windowed elements paint themselves on top of all windowless elements, despite the wishes of their container. However, windowed elements do follow the z-index attribute with respect to each other, just as windowless elements follow the z-index attribute with respect to each other.
All windowless elements are rendered on the same MSHTML plane, and windowed elements draw on a separate MSHTML plane. You can use z-index to manipulate elements on the same plane but not to mix and match with elements in different planes. You can rearrange the z-indexing of the elements on each plane, but the windowed plane always draws on the top of the windowless plane.
http://support.microsoft.com/kb/177378
This is actually a benefit to the advertising service - it prevents publishers from masking, covering and slightly altering their ads (for instance, putting an image in front of the ad to make it blend in with the site).
精彩评论