YouTube wmode=opaque not working in IE9 (or any other IE)

安稳与你 提交于 2020-01-15 09:05:35

问题


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...

http://jsfiddle.net/KtbYR/30/

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;
}

回答1:


How exactly are you testing whether this works in IE? I just checked and the image layers on top of the video properly

  • IE9
  • IE8
  • IE7
  • IE6


来源:https://stackoverflow.com/questions/9033080/youtube-wmode-opaque-not-working-in-ie9-or-any-other-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!