jquery - 无法在 JQuery 视频插件上覆盖内容 - JQuery.videoBG

标签 jquery html css jquery-plugins

我正在使用 jquery 插件 https://github.com/sydlawrence/jquery.videoBG在后台播放视频。

index.html

<!doctype html>
<html>
<head>
    <title>RhytmicWorks Software</title>
    <link rel="stylesheet" href="css/app.css">

    <script src="bower_components/jquery/jquery.js"></script>



        <script type="text/javascript" src="jquery.videoBG/jquery.videoBG.js"></script>
    <script src="js/videobg.js"></script> 


</head>
<body>

<div class="common">
    This is inside testing div
    </div>
</body>
</html>

应用.css

.common{
    position:absolute;
    height:30%;
    width:100%;
    background-color: pink;
    z-index:1;

}

videobg.js

$(document).ready(function() {


    $('body').videoBG({
        position:"fixed",
        zIndex:-1,
        mp4:'assets/Rhythm.mp4',
        webm:'assets/Rhythm.webm',
        opacity:1,
        fullscreen:true,
    });

});

我可以在后台播放视频,但只有不加载插件才能看到带有'common'类的div

最佳答案

我知道这看起来很明显,但是,您是否尝试过将 z-index 正值添加到您的普通 div 中?

关于jquery - 无法在 JQuery 视频插件上覆盖内容 - JQuery.videoBG,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25195218/

相关文章:

php - 如何在动态 php 文件中使用 toggle() 函数切换每个 div

javascript - 当表单字段发生更改且未保存时提示用户

html - 用于替换 HTML 文档中的变量的 Shell 脚本

javascript - 如何在点击时动态添加JSP页面

css - 文本动画在 IE 中不起作用

javascript - 如何使用 JQuery 以编程方式单击文本输入?

javascript - jQuery 图像映射器 : Highlight Areas prior to selecting

Jquery - 如何区分具有相同类的多个按钮

javascript - 动画边框样式

html - 框内图像旁边的文本未对齐