我正在使用 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/