问题
I have a web app in which I am embedding Youtube videos using the iframe tag. I am also using bootstrap modal. So the issue arises in IE when the bootstrap modal fails to overlap the youtube video. Now i googled for this and I found a lot of answers saying that adding wmode=transparent should fix the issue. Well, It did not for me.
Since I couldnt figure out a way for setting up a jsfiddle, I went to the bootstrap modal demo site and edited their code and added a youtube video. Please refer the below screenshot for more details.
And when I clicked on the "Launch demo modal", it did not work
Can anyone explain why this is not working or have a solution for this?
Here is the youtube video code which i put just above that modal button
<iframe class="yt-video-iframe" src="https://www.youtube.com/v/WEROVWDp3n0?version=3&f=videos&app=youtube_gdata&wmode=transparent"></iframe>
I am using:
- IE 9
- bootstrap modal version 2.3.1
- Youtube API version 2
回答1:
Try using wmode=opaque instead of wmode=transparent. But check with chrome. By the way, if you do it on firebug it wont work.
来源:https://stackoverflow.com/questions/16900804/wmode-transparent-for-youtube-video-iframe-not-working-in-ie-with-bootstrap-moda