YouTube wmode=opaque not working in IE9 (or any ot

2019-07-26 01:12发布

问题:

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