jquery实现视觉滚动--fullpage
用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的更多相关文章
- jQuery全屏滚动插件fullPage.js中文帮助文档API
jQuery全屏滚动插件fullPage.js中文帮助文档API 发现了一个fullPage.js插件,于是百度了一下,还就是这个插件的作用,其实有很多网站都做了全屏滚动的特效,效果也很好看,今天 ...
- 精心挑选10款优秀的 jQuery 图片左右滚动插件
在现代的网页设计中,图片和内容滑块是一种极为常见和重要的元素.你可以从头开始编写自己的滑动效果,但是这将浪费很多时间,因为网络上已经有众多的优秀的 jQuery 滑块插件.当然,如果要从大量的 jQu ...
- 【jQuery】scroll 滚动到顶部
Jquery 实现页面滚动到顶端 $(document).ready(function () { // 滚动窗口来判断按钮显示或隐藏 $(window).scroll(function () { // ...
- jQuery BreakingNews 间歇滚动
BreakingNews 是一款基于jQuery的间歇滚动插件.它可以设置标题.标题颜色.标题背景颜色.链接颜色.字体大小.边框.宽度.自动滚动.间歇时间等等,同时它还好提供两种过度方式--淡入淡出( ...
- Infinite Scroll - jQuery & WP 无限滚动插件
无限滚动(Infinite Scroll)也称为自动分页.滚动分页和无限分页.常用在图片.文章或其它列表形式的网页中,用来在滚动网页的时候自动加载下一页的内容.Infinite Scroll 这款 ...
- jQuery图片无缝滚动JS代码ul/li结构
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- jquery文字左右滚动
实现jquery文字左右滚动 <div class="fl">中奖名单:</div> <div class="scrollText" ...
- jQuery图片无缝滚动
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- jQuery.hhLRSlider 左右滚动图片插件
/** * jQuery.hhLRSlider 左右滚动图片插件 * User: huanhuan * QQ: 651471385 * Email: th.wanghuan@gmail.com ...
随机推荐
- 机器学习中的范数规则化之(一)L0、L1与L2范数 非常好,必看
机器学习中的范数规则化之(一)L0.L1与L2范数 zouxy09@qq.com http://blog.csdn.net/zouxy09 今天我们聊聊机器学习中出现的非常频繁的问题:过拟合与规则化. ...
- hdu1051 Wooden Sticks
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1051 大意:求最少升序序列的个数. #include <cstdio> #include &l ...
- Fedora安装
转载:http://www.51ou.com/browse/fedora/33174.html 安装fedora后的20个系统设置 安装VirtualBox增强工具 1.编辑sudoers文件,先备份 ...
- poj3080解题报告(暴力、最大公共子串)
POJ 3080,题目链接http://poj.org/problem?id=3080 题意: 就是求m个长度为60的字符串的最长连续公共子串,2<=m<=10 规定: 1.最长公共串长度 ...
- Android(java)学习笔记91:泛型接口的概述和使用
package cn.itcast_06; /* * 泛型接口:把泛型定义在接口上 */ public interface Inter<T> { public abstract void ...
- Eclipse+Axis自动生成Web Service WSDL文件
JDK版本:1.5.0_22 Eclipse版本:Helios Service Release 2(3.6.2) 首先创建一个web工程,创建过程如下: 如果选择Apache Tomcat v5.5, ...
- appendChild()插入节点需注意的问题
第一点:首先appendChild插入节点时返回的值是插入的节点本身,另外必须要找到所要插入的父节点: var returnNode = parentNode.appendChild(childNod ...
- android 代码设置、打开wifi热点及热点的连接
用过快牙的朋友应该知道它们在两天设备之间传输文件的时候使用的是wifi热点,然后另一台便连接这个热点再进行传输.快牙传输速度惊人应该跟它的这种机制有关系吧.不知道它的搜索机制是怎样的,但我想应该可以通 ...
- HTML5 图片上传预览
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8& ...
- CSS3 动画记
css3 动画 在CSS3中可以通过animation创建复杂的动画序列,像transition属性一样用来控制CSS的属性实现动画效果. animation实现动画效果主要由两个部分组成. 通过类似 ...