When using swfobject, swf file ignores z-index

2019-05-20 06:54发布

问题:

I have this issue where if I append a swf file using SWFObject, it ignores my css rules for z-index. I have tried to set the parent container, the swf file, and everything around it; nothing seems to work for me. Has anyone ran into this issue and could give me some helpful advice?

Thanks, Kyle

回答1:

Make sure your using "transparent" wmode.

var params = {};
params.wmode = "transparent"; 
swfobject.embedSWF("file.swf", "id_name", "100", "100", "10.0.0",false,false,params);


回答2:

Z-index is ignored by Flash Player, you can't control it. Here's a quick overview with examples.