Google Chrome,Flash和z-index错误behvaiour [英] Google Chrome, Flash and z-index wrong behvaiour
问题描述
我必须在包含Flash视频的iframe上显示div。 div的z-index被设置为9999,但是ifarame没有任何z-index。但是Google的谷歌浏览器版本低于谷歌浏览器,它在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.htmlstyle =width:100%; height:100%;>
< / iframe>
< / div>
< div id =textDivstyle =position:absolute; z-index:9999; left:200px; top:200px; border:5px solid rgb(235,127,0); width:300px;高度:200像素;背景色:#FFF;溢出:汽车;>
这是文本div
< / div>
< div id =flashDivstyle =height:150px;>
< / div>
< / body>
< / html>
blank.html
<!doctype html>
< html>
< head>< / head>
< body>< / body>
< / html>
请解决这个问题。
预先感谢,
Prashant
注意:请不要告诉解决方案保持wmode = transparent作为iframe src中的get参数。因为它不是这个问题的一个通用的解决方案。你可以通过查询字符串来添加一个wmode参数。 / p>
例如: src =http://www.youtube.com/embed/LSaoRSlqQzw?wmode=opaque
I have to show a div over the iframe which contains a flash video . The z-index of the div is set as 9999. but the ifarame is not having any z-index. But the div lies bellow the flash for Google Chrome, it works fine in IE 7/8/9 and Mozila Firefox.
The code i am using is
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>
blank.html
<!doctype html>
<html>
<head></head>
<body></body>
</html>
Please give some work around for this problem.
Thanks in advance,
Prashant
Note : Please don't tell the solution as keeping "wmode=transparent" as a get parameter in the iframe src . as its not a generalized solution for this issue .
You can add a wmode parameter by query string.
Ex: src="http://www.youtube.com/embed/LSaoRSlqQzw?wmode=opaque"
这篇关于Google Chrome,Flash和z-index错误behvaiour的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!