flash - Google Chrome、Flash 和 z-index 错误行为

标签 flash google-chrome iframe youtube z-index

我必须在包含 Flash 视频的 iframe 上显示一个 div。 div 的 z-index 设置为 9999。但 ifarame 没有任何 z-index。但是 div 位于 Google Chrome 的 flash 下方,它在 IE 7/8/9 和 Mozila Firefox 中运行良好。

我使用的代码是

flash.html

    <!doctype html>
<html>
    <head>
        <title> Flash - zIndex</title>
    </head>
    <body>
        <div style="position : absolute;left:200px;top:200px;width:320px; height:220px;background-color:#fff;z-index:999;" >
            <iframe src="blank.html"  style="width:100%; height:100%;">
            </iframe>
        </div>
            <div id="textDiv" style="position : absolute; z-index:9999; left:200px;top:200px;border: 5px solid rgb(235, 127, 0);width:300px; height:200px;background-color:#fff;overflow:auto;">
            this is the text div
            </div>
        <div id="flashDiv" style="height: 150px;">
        </div>
            <iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/3RD_3wooRjI" frameborder="0" allowfullscreen></iframe>
    </body>
</html>

空白.html
<!doctype html>
<html>
<head></head>
<body></body>
</html>

请为这个问题提供一些解决方法。

提前致谢,

普拉尚

注意:请不要告诉解决方案将“wmode=transparent”作为 iframe src 中的获取参数。因为它不是这个问题的通用解决方案。

最佳答案

您可以通过查询字符串添加 wmode 参数。

例如:src="http://www.youtube.com/embed/LSaoRSlqQzw?wmode=opaque"

关于flash - Google Chrome、Flash 和 z-index 错误行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5323020/

相关文章:

flash - 一旦变成.swf,您如何在Flash中以某种方式显示错误?

javascript - 对 JavaScript 文件的更改未在 Chrome 上显示

html - 在浏览器内查看 PDF - 在 Chrome 中使用 POST 时出现问题

javascript - 无法使用 jquery 访问通过 google chrome 内容脚本注入(inject)的 iframe 内容

javascript - 添加具有自定义协议(protocol)的 iframe 会导致 IE 导航到 iframe 源

actionscript-3 - 在 Flex 中将 String 转换为 Date 对象

flash - 如何在 ActionScript 中更改按钮 onclick?显示隐藏?

javascript - 使用 jquery 预览 html 文档

javascript - 通过 Javascript 将 IFRAME 添加到 DOM

node.js - 通过 TLS 连接上的 Node js 将跨域策略发送到 Flash