用fullpage.js实现视觉滚动效果

1.Html页面

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>使用fullpage实现视觉滚动效果</title>
<script type="text/javascript" src="js/fullPage.min.js"></script>
<link href="css/index.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.1.8.1.js"></script>
</head>
<body>
<div id="pageContain">
<div class="page page1 current" id="page1">
<img class="imgStyle" src="img/p16.jpg">
<div class="contain pa section">
<div class="title1">第一屏</div>
<a id="transparent_div1" style="position:absolute;text-align:center;bottom:0px;width: 500px;left:50%;margin-left: -250px;"><img style="width:28px;height:36px;z-index:5;" src="img/arrow_down.png"></a>
</div>
</div> <div class="page page2" id="page2">
<img class="imgStyle" src="img/p2.jpg">
<div class="contain pa section">
<div class="section_title">第二屏</div>
</div>
</div> <div class="page page3" id="page3">
<img class="imgStyle" src="img/p4.jpg">
<div class="contain pa section">
<div class="section_title">第三屏</div>
<!-- <div class="slide">第三屏的第一屏</div>
<div class="slide">第三屏的第二屏</div>
<div class="slide">第三屏的第三屏</div>
<div class="slide">第三屏的第四屏</div>
<ul id="navBar1">
<li></li>
<li></li>
<li></li>
<li></li>
</ul> -->
</div>
</div> <div class="page page4" id="page4">
<img class="imgStyle" src="img/p5.jpg">
<div class="contain pa section">
<div class="section_title">第四屏</div>
</div>
</div> <div class="page page5" id="page5">
<img class="imgStyle" src="img/p8.jpg">
<div class="contain pa section">
<div class="section_title">第五屏</div>
</div>
</div> <div class="page page6" id="page6">
<div class="contain pa section">
<div class="section_title">第六屏</div>
</div>
</div>
</div> <ul id="navBar">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul> <script type="text/javascript">
var runPage;
runPage = new FullPage({
id: 'pageContain',
slideTime: 800,
effect: {
transform: {
translate: 'Y'
},
opacity: [0, 1]
},
mode: 'wheel, touch, nav:navBar',
easing: 'ease',
scrollDelay:400
}); $('#transparent_div1').on('click', function(){
runPage.next();
}); window.onload=function(){
$('#transparent_div1').css({
'opacity': 0.5,
'display': 'block'
}).animate({
"opacity": 1
}, 2000);
} setInterval(function(){
$('#transparent_div1').animate({'bottom':'25px'},200).animate({'bottom':'5px'},200).animate({'bottom':'15px'},200);
},600); //pageup pagedown控制滚动
document.onkeydown=function(event){
var e = event || window.event || arguments.callee.caller.arguments[0]; if(e && e.keyCode==38){
runPage.prev();
} if(e && e.keyCode==40 ){
runPage.next();
}
};
</script>
</body> </html>

效果图

源代码地址:http://files.cnblogs.com/files/gzx618/fullPage.zip

jquery实现视觉滚动--fullpage的更多相关文章

  1. jQuery全屏滚动插件fullPage.js中文帮助文档API

    jQuery全屏滚动插件fullPage.js中文帮助文档API   发现了一个fullPage.js插件,于是百度了一下,还就是这个插件的作用,其实有很多网站都做了全屏滚动的特效,效果也很好看,今天 ...

  2. 精心挑选10款优秀的 jQuery 图片左右滚动插件

    在现代的网页设计中,图片和内容滑块是一种极为常见和重要的元素.你可以从头开始编写自己的滑动效果,但是这将浪费很多时间,因为网络上已经有众多的优秀的 jQuery 滑块插件.当然,如果要从大量的 jQu ...

  3. 【jQuery】scroll 滚动到顶部

    Jquery 实现页面滚动到顶端 $(document).ready(function () { // 滚动窗口来判断按钮显示或隐藏 $(window).scroll(function () { // ...

  4. jQuery BreakingNews 间歇滚动

    BreakingNews 是一款基于jQuery的间歇滚动插件.它可以设置标题.标题颜色.标题背景颜色.链接颜色.字体大小.边框.宽度.自动滚动.间歇时间等等,同时它还好提供两种过度方式--淡入淡出( ...

  5. Infinite Scroll - jQuery & WP 无限滚动插件

    无限滚动(Infinite Scroll)也称为自动分页.滚动分页和无限分页.常用在图片.文章或其它列表形式的网页中,用来在滚动网页的时候自动加载下一页的内容.Infinite Scroll  这款  ...

  6. jQuery图片无缝滚动JS代码ul/li结构

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. jquery文字左右滚动

    实现jquery文字左右滚动 <div class="fl">中奖名单:</div> <div class="scrollText" ...

  8. jQuery图片无缝滚动

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  9. jQuery.hhLRSlider 左右滚动图片插件

    /**  * jQuery.hhLRSlider 左右滚动图片插件  * User: huanhuan  * QQ: 651471385  * Email: th.wanghuan@gmail.com ...

随机推荐

  1. UVA 816 - Abbott&#39;s Revenge(BFS)

    UVA 816 - Abbott's Revenge option=com_onlinejudge&Itemid=8&page=show_problem&category=59 ...

  2. mac 功能修改。。。。

    个人表示 Mac 下的 Spotlight 搜索功能确实是个鸡肋,安装 QuickSilver 才是王道!所以我个人就把 Spotlight 关闭掉了.方法很简单,还是要用到 “终端” 工具. 在 “ ...

  3. apache常见错误汇总

    <>问题: Access forbidden! You don't have permission to access the requested directory. There is ...

  4. mysql索引需要了解的几个注意

    板子之前做过2年web开发培训(入门?),获得挺多学生好评,这是蛮有成就感的一件事,准备花点时间根据当时的一些备课内容整理出一系列文章出来,希望能给更多人带来帮助,这是系列文章的第一篇 注:科普文章一 ...

  5. Helpers\ReservedWords

    Helpers\ReservedWords This helper returns an array of reserved words, this includes php 7's new rese ...

  6. A very hard Aoshu problem

    A very hard Aoshu proble Problem Description Aoshu is very popular among primary school students. It ...

  7. 最小K个数之和

    描述 输入n个整数,输出其中最小的K个数之和.例如输入4,5,1,1,6,2,7,3,3这9个数字,当k=4,则输出最小的4个数之和为7(1,1,2,3). 输入 测试样例组数不超过10 每个测试案例 ...

  8. 用DAEMON TOOLS打开rational ross 的bin文件并安装过程梳理

    最近要开始准备毕业设计了,学习熟悉了一些UML用例图.类图之类的,开始准备用自家PC电脑画图的时候发现Rational Ross没安装. 本以为简单,却碰上bin文件.琢磨好久,终于把Ross安上了. ...

  9. C++中枚举定义运算符

    由于枚举也是用户定义类型,所以是可以定义运算符, 如: enum Day {sun, mon, tue, wen, thu, fri, sat}; Day& operator++(Day&am ...

  10. 写入文件txt

    FileStream fs = new FileStream(@"d:\service.txt", FileMode.OpenOrCreate, FileAccess.Write) ...