Youtube iframe wmode issue

2019-01-03 12:13发布

Using javascript with jQuery, I am adding an iframe with a youtube url to display a video on a website however the embed code that gets loaded in the iframe from youtube doesnt have wmode="Opaque", therefore the modal boxes on the page are shown beneath the youtube video.

Any ideas how to solve the issue?

9条回答
Lonely孤独者°
2楼-- · 2019-01-03 12:58

Just a tip!--make sure you up the z-index on the element you want to be over the embedded video. I added the wmode querystring, and it still didn't work...until I upped the z-index of the other element. :)

查看更多
够拽才男人
3楼-- · 2019-01-03 12:59

Try adding ?wmode=opaque to the URL or &wmode=opaque if there already is a parameter.

If it doesn't work try this instead, &wmode=transparent which will work in IE browser as well.

查看更多
一纸荒年 Trace。
4楼-- · 2019-01-03 12:59

Adding ?wmode=opaque to the URL seems to solve this problem for me, although I have not tested it in IE yet.

For those of you having troubles with the previously proposed solution, note that an inital ampersand will only work if you are already supplying other arguments to the URL. The first argument must have an initial question mark: http://www.example.com?first=foo&second=bar

查看更多
登录 后发表回答