我的网站使用VS 2010在VB中,我的z-index属性设置为20,并且在图片和其他方面运行良好。但是我有两个youtube视频,并且z-index属性不起作用;我要显示的菜单已被youtube视频覆盖-但仅在IE中;其他浏览器工作正常!
难道我做错了什么?或者,当它是youtube视频时,我应该做些不同的事情吗?
我的嵌入式视频看起来像这样,它涵盖了我的菜单:
<table class="tablestyle0">
<tr>
<td>
<iframe id="ShowFrameID" width="640" height="480"
src="http://www.youtube.com/embed/IxiZ0sdh6hw?wmode=opaque?
modestbranding=1&rel=0">
</iframe>
</td>
</tr>
在这方面的任何帮助或指导将不胜感激!
最佳答案
如果将wmode=opaque
更改为wmode=transparent
,则YouTube播放器应遵守您的z-index顺序。
编辑:问题是您的YouTube URL中有两个?
字符。 wmode = opaque部分未通过服务器。
在做出更改后,它对我有用。您可能不必将其设置为transparent
(opaque
也应该起作用)。
<table class="tablestyle0">
<tr>
<td>
<iframe id="ShowFrameID" width="640" height="480"
src="http://www.youtube.com/embed/IxiZ0sdh6hw?wmode=opaque&modestbranding=1&rel=0">
</iframe>
</td>
</tr>
关于asp.net - Z-Index属性不适用于youtube视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12497733/