【问题标题】:Youtube videos in jQuery dialogs always on top of other contentjQuery 对话框中的 Youtube 视频始终位于其他内容之上
【发布时间】:2011-06-10 15:48:50
【问题描述】:

我在 jQuery 对话框中嵌入视频时遇到了一些问题。它显示和播放都很好,但它总是在其他对话框的前面。当我将另一个对话框传递给带有视频的对话框时,视频始终处于最重要的位置...有人可以帮忙吗?

【问题讨论】:

    标签: css flash youtube z-index video-embedding


    【解决方案1】:

    您的问题与 jQuery 或 JavaScript 无关。它与 Flash 对象的 z-index 有关。

    我之前成功使用过这个解决方案...

    http://manisheriar.com/blog/flash_objects_and_z_index

    • 将您的 Flash 内容放入名为 flash 的包装器 div

    • <param name="wmode" value="transparent"> 添加到您的object 标签

    • wmode="transparent"添加到embed标签中

    • 使用 CSS 为您的 div 设置 positionz-index(不要设置负 z-index 值,因为它会隐藏您的 Flash)

    CSS

    #flash {
        position: relative; /*or absolute*/
        z-index: 0;
    }
    

    HTML

    <div id="flash">
        <object .... >
            <param name="wmode" value="transparent">
            <embed .... wmode="transparent">
        </object>
    </div>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-30
      • 2012-08-10
      • 1970-01-01
      • 1970-01-01
      • 2013-01-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多