我正在尝试制作我的第一个视频背景,并找到了这个管状插件。当我按照步骤操作时,似乎在正文中添加代码变得复杂。我添加了 jquery 链接,由于某种原因,我添加的代码无效。谁能帮我如何使这个插件工作?
这是我试图遵循的指令: https ://code.google.com/p/jquery-tubular/
先感谢您!
这是我的代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Using Tubular Plugin</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.tubular.1.0.js"></script>
<style type="text/css">
body,html { margin:0; padding::0; height:100%; width:100%;}
#topSection {
background-color: #D8D8D8;
height:100%;
min-height:100%;
width:100&;
position:relative;
}
</style>
</head>
<body>
$().ready(function() {
$('#wrapper').tubular({videoId: 'idOfYourVideo'}); // where idOfYourVideo is the YouTube ID.
});
<section id="topSection">Top section- I need a youtube video background here</section>
</body>
</html>