我必须在包含 flash 视频的 iframe 上显示一个 div。 div 的 z 索引设置为 9999。但 ifarame 没有任何 z 索引。但 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>
请为这个问题提供一些解决方法。
提前致谢,
Prashant
注意:请不要告诉解决方案将“wmode=transparent”保留为 iframe src 中的获取参数。因为它不是这个问题的通用解决方案。
您可以通过查询字符串添加 wmode 参数。
Ex: src="http://www.youtube.com/embed/LSaoRSlqQzw?wmode=opaque"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)