gpt4 book ai didi

Javascript 视频BG

转载 作者:行者123 更新时间:2023-11-28 12:44:36 24 4
gpt4 key购买 nike

我正在尝试使用 videoBG 中的 jQuery 插件让视频填充 100% 宽度和高度的顶部 div。我想要#top-video 来填充#top-content。问题是什么都没有出现。有什么建议么?谢谢!

<!DOCTYPE html>
<html>
<head>
<title>Dupont Studios</title>
<link href= 'style.css' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Oxygen:300' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<script type="text/javascript" src="waypoints.js"></script>
<script type="text/javascript" src="jquery.videoBG.js"></script>

<script>


$(function() {
// Do our DOM lookups beforehand
var nav_container = $(".nav-container");
var nav = $("nav");
nav_container.waypoint({
handler: function(direction) {
nav_container.toggleClass('sticky', direction=='down');
}
});
});


$('#top_video').videoBG({
mp4:'test.mp4',
scale:true,
zIndex:0
});




</script>
</head>
<body>

<div id = 'top-container'>
<div id = 'top-content'>
<div id = 'top-video'>
<span>Here is some text</span>
</div>


<div id = 'top-text'>
<div id = 'top-img'>
<img src='top-img.png' width = "600" height = '115'>
</div>
<h1 id = 'top-slogan'>A Video Production Studio</h1>
</div>
</div>
<div class = 'nav-container'>
<nav>
<div id = 'header-img'>
<img src='top-img.png' width = "450" height = '86.25'>
</div>
<div id = 'nav-items-container'>
<ul class = 'nav-items'>
<li class = 'nav-item'><a href='#'><b>w</b>hat</a></li>
<li class = 'nav-item'><a href='#'><b>h</b>ow</a></li>
<li class = 'nav-item'><a href='#'><b>w</b>hy</a></li>
<li class = 'nav-item'><a href='#'><b>w</b>here</a></li>
<li class = 'nav-item'><a href='#'><b>w</b>ho</a></li>
</ul>
</div>
</nav>
</div>
</div>

<div id = 'main-container'>
<div id = 'main-content'>
<div id = 'main-content1'>
<section>
<h2>what we do</h2>
<p>We have built a boutique full service video producton studio quite literally in the heart of Dupont Circle.
Yes, our address is 21 Dupont Circle- we're racross from the south end of the dupont metro stop, right near the Krispy Kreme...mmm,good!</p>
<p>Unlike other video production studios, we have an exclusive focus on subscription based filming that
allows for organizations to build their brand and convey their ideas on a weekly, bi-weekly, or monthly basis.</p>

<p>
The benefits of subscription based video production allows us to more <mark class = 'blue-me'>deeply partner</mark> with our clients
and align interest for long term <mark class = 'blue-me'>strategic communication goals</mark>.
</p>
</section>
</div>
<div id = 'main-content2'>
<section>
<div id = 'video-text'>
<p>We have built a boutique full service video producton studio quite literally in the heart of Dupont Circle.
Yes, our address is 21 Dupont Circle- we're racross from the south end of the dupont metro stop, right near the Krispy Kreme...mmm,good!
</p>
</div>
<div id = 'video'>
<iframe src="http://player.vimeo.com/video/69176991?title=0&amp;byline=0&amp;portrait=0" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
</div>
</section>
</div>
<section>
<div id = 'picture'>
<img src='test.jpg' width = "1200" height = '800'>
</div>
</section>
</div>
</div>
</body>
</html>

最佳答案

你不应该使用 #top-video 而不是 #top_video 作为你的选择器吗?

关于Javascript 视频BG,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17452621/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com