我试图通过 CSS (绝对定位)将透明 PNG 放置在 SWF 影片上。 但是,当我将 PNG 直接放置在 SWF 上时,SWF 上的所有单击操作似乎都被禁用。 SWF 要求使用您的网络摄像头,但您无法单击任何按钮。 查看此链接查看示例。 您可以在此处找到 CSS 和 png在这里。
就像 PNG 充当一个您无法点击的覆盖平面。 我已经在 CSS 和 SWF 中尝试了一些透明属性,但似乎没有任何效果。 对于这种特殊情况有什么想法/建议/经验吗?
谢谢
I'm trying to position a transparent PNG over a SWF movie through CSS (absolute positioning). But when I position the PNG directly over the SWF, all click actions on the SWF seem to be disabled. The SWF is asking to use your webcam, but you can't click any of the buttons. Check this link for an example. You can find the CSS here and the png here.
It's like the PNG acts as a overlaying plane you can't click through. I've tried some transparent properties in both the CSS and SWF, but nothing seems to work. Any ideas/suggestions/experience with this particular situation?
Thanks
发布评论
评论(3)
您的怀疑是正确的:PNG 位于 Flash 片段正上方的图层中,您无法单击它。
既然您只是将 PNG 用于圆角,为什么不尝试以下操作:
基本上,将你的角落变成 CSS 精灵。
编辑:您可能仍然会遇到 div#corners 具有明确的高度和宽度并充当图层的问题。 在这种情况下,您可能希望完全废弃它并将角绝对定位在 div#corners 的父元素上。
Your suspicion is correct: the PNG is in a layer that's sitting right on top of your Flash piece and you cannot click through it.
Since you're just using that PNG for rounded corners, why not try the following:
Basically, turn your corners into CSS sprites.
EDIT: You'll probably still run into problems with div#corners having an explicit height and width and acting as a layer. In that case, you might want to scrap it entirely and absolutely position the corners wrt div#corners's parent Element.
如果你在CSS中将pointer-events设置为none,它会起作用吗?
点击 DIV 到达底层元素
Does it work if you set pointer-events to none in your css?
Click through a DIV to underlying elements
AFAIR,如果 swf 位于另一个对象下,则无法对其进行操作,上面的对象将获得所有点击,您应该编辑原始 swf 或考虑页面上的不同图形
AFAIR you cannot give swf actions if it's under another object , upper object will get all the clicks , you should edit oryginal swf or consider different graphics on page