全屏滚动fullPage.js
文章目录
“全屏”效果
##安装
// With npm
npm install fullpage.js
##引入
依赖jquery
<!--fullPage css-->
<link rel="stylesheet" type="text/css" href="jquery.fullPage.css" />
<!--jquery 使用百度的cdn-->
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.js"></script>
<!-- This following line is optional. Only necessary if you use the option css3:false and you want to use other easing effects rather than "linear", "swing" or "easeInOutCubic". -->
<script src="http://apps.bdimg.com/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<!-- This following line is only necessary in the case of using the plugin option `scrollOverflow:true` -->
<script type="text/javascript" src="vendors/jquery.slimscroll.min.js"></script>
<!--fullPage js-->
<script type="text/javascript" src="jquery.fullPage.js"></script>
##Html结构
1 | <div id="fullpage"> |
##初始化
简单的初始化
1 | $(function(){ |
复杂的初始化
1 | $(function() { |