YouTube wmode=opaque 不适用于 IE9(或任何其他 IE)
我需要使用 wmode=opaque 或类似的东西,因为我想在视频前面放置一个图像(占位符和箭头图像,因为视频将在幻灯片中显示)。
然而,我正在努力让它在任何版本的 IE 中工作(甚至是 9!)。
我还尝试了 wmode 的每种变体 - 不透明、透明、窗口和直接
这是代码的链接...
这是用于保存目的的实际代码...
/* HTML */
<div id="tabs2">
<div>
<img class='thumb' src='http://static.guim.co.uk/sys-images/Guardian/Arts_/Pictures/2003/12/04/explosions.jpg'>
<iframe id="frame1" width="640" height="390" frameborder="0" title="YouTube video player"type="text/html"src="http://www.youtube.com/embed/u1zgFlCw8Aw?e&wmode=opaque"></iframe>
</div>
<div>
<img class='thumb' src='http://static.guim.co.uk/sys-images/Guardian/Arts_/Pictures/2003/12/04/explosions.jpg'>
<iframe id="frame2" width="640" height="390" frameborder="0" title="YouTube video player"type="text/html"src="http://www.youtube.com/embed/u1zgFlCw8Aw?wmode=opaque"></iframe>
</div>
/* CSS */
#tabs2 div {
position: relative;
}
.thumb {
position: absolute;
}
I need to use wmode=opaque or something similar because I would like to place an image in front of the video (placeholder and arrow images as the videos will be in a slideshow).
However, I'm struggling to get this to work in any version of IE (even 9!).
I've also tried every variant of wmode - opaque, transparent, window and direct
Here is a link to the code...
Here is the actual code for preservation purposes...
/* HTML */
<div id="tabs2">
<div>
<img class='thumb' src='http://static.guim.co.uk/sys-images/Guardian/Arts_/Pictures/2003/12/04/explosions.jpg'>
<iframe id="frame1" width="640" height="390" frameborder="0" title="YouTube video player"type="text/html"src="http://www.youtube.com/embed/u1zgFlCw8Aw?e&wmode=opaque"></iframe>
</div>
<div>
<img class='thumb' src='http://static.guim.co.uk/sys-images/Guardian/Arts_/Pictures/2003/12/04/explosions.jpg'>
<iframe id="frame2" width="640" height="390" frameborder="0" title="YouTube video player"type="text/html"src="http://www.youtube.com/embed/u1zgFlCw8Aw?wmode=opaque"></iframe>
</div>
/* CSS */
#tabs2 div {
position: relative;
}
.thumb {
position: absolute;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你到底如何测试这在 IE 中是否有效?我刚刚检查了视频顶部的图像层正确
How exactly are you testing whether this works in IE? I just checked and the image layers on top of the video properly