用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. CSS里的单位

    CSS中预设了16种颜色以及16种颜色的衍生色,这16种颜色是CSS规范推荐的.并且一些主流的浏览器都可以识别.例如以下表所看到的: 十六进制颜色是最经常使用的定义方式.它的基本格式为#RRGGBB, ...

  2. 手机NFC通信的安全车钥匙

    SmartKeys for Cyber-Cars:Secure Smartphone-based NFC-enabled Car Immobicizer 手机NFC通信的安全车钥匙 1概述 如今,智能 ...

  3. [Angular 2] *ngFor

    heros.ts: import {Component} from "@angular/core"; const HEROES = [ {id: 1, name:'Superman ...

  4. MySQL 行子查询(转)

    MySQL 行子查询 行子查询是指子查询返回的结果集是一行 N 列,该子查询的结果通常是对表的某行数据进行查询而返回的结果集. 一个行子查询的例子如下: SELECT * FROM table1 WH ...

  5. .net控件Control透明

    public partial class tspControl : UserControl { public tspControl() { InitializeComponent(); SetStyl ...

  6. Linux内核--网络栈实现分析(二)--数据包的传递过程--转

    转载地址http://blog.csdn.net/yming0221/article/details/7492423 作者:闫明 本文分析基于Linux Kernel 1.2.13 注:标题中的”(上 ...

  7. linux乱码问题

    命令输入: export LANG=zh_CN.GBK grep 匹配时高亮 先执行:export GREP_OPTIONS='--color=auto'; 后执行:grep 匹配内容 文件; 描述: ...

  8. Helpers\Password

    Helpers\Password The password class uses php 5 password_ functions. To create a hash of a password, ...

  9. Integer的缓存和自动拆装箱

    先看一个简单的例子: public class TestInteger { public static void main(String[] args) { System.out.println(&q ...

  10. hadoop学习记录(一)HDFS

    hadoop的灵感源于谷歌,最初目的是解决传统数据库处理数据成本高和速度慢的问题. hadoop两个核心项目是HDFS(hadoop分布式文件系统)和MapReduce. HDFS用来实现数据的存储, ...