jQuery鼠标滚动垂直全屏切换代码
体验效果:
http://hovertree.com/texiao/jquery/68/
源码下载:
http://hovertree.com/h/bjaf/f643upc4.htm
代码如下:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jQuery鼠标滚动垂直全屏切换代码 - 何问起</title><base target="_blank" />
<style type="text/css">
h1, body, html {
padding: 0;
margin: 0;
} html, body {
height: 100%;
overflow: hidden;
} h1 {
font-size: 2em;
font-weight: normal;
} p {
font-size: 1em;
margin: 0.5em 0 2em 0;
} #container, .section {
height: 100%;
position: relative;
} #section0, #section1, #section2, #section3 {
background-color: #000;
background-size: cover;
background-position: 50% 50%;
} #section0 {
background-color: #024BCE;
color: #fff;
text-shadow: 1px 1px 1px #333;
} #section1 {
color: #fff;
text-shadow: 1px 1px 1px #333;
background-color: #31B81D;
} #section2 {
background-color: #01B5F0;
color: #fff;
text-shadow: 1px 1px 1px #666;
} #section3 {
color: #008283;
background-color: #5D0FF1;
text-shadow: 1px 1px 1px #fff;
} #section0 p { color: #F1FF00; } #section3 p { color: #00A3AF; } .left { float: left; } .intro {
position: absolute;
top: 50%;
width: 100%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
text-align: center;
} #pages {
position: fixed;
right: 10px;
top: 50%;
list-style: none;
} #pages li {
width: 8px;
height: 8px;
border-radius: 50%;
background: #fff;
margin: 0 0 10px 5px;
} #pages li.active {
width: 14px;
height: 14px;
border: 2px solid #FFFE00;
background: none;
margin-left: 0;
} #section0 .title {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-animation: sectitle0 1s ease-in-out 100ms forwards;
animation: sectitle0 1s ease-in-out 100ms forwards;
} #section0 p {
-webkit-transform: translateX(100%);
transform: translateX(100%);
-webkit-animation: sec0 1s ease-in-out 100ms forwards;
animation: sec0 1s ease-in-out 100ms forwards;
}
@-webkit-keyframes
sectitle0 { 0% {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
@keyframes
sectitle0 { 0% {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
@-webkit-keyframes
sec0 { 0% {
-webkit-transform: translateX(100%);
transform: translateX(100%);
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
@keyframes
sec0 { 0% {
-webkit-transform: translateX(100%);
transform: translateX(100%);
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
.hovertreecode{text-align:left;width:400px;margin:5px auto;border:solid green 1px;font-size:16px;}
a{color:greenyellow}
</style>
</head>
<body>
<div id="container">
<div class="section active" id="section0">
<div class="intro">
<h1 class="title">jQuery简单的全屏滚动翻页</h1>
<p>
http://hovertree.com
<br />请滚动鼠标滚轮。
</p>
<p>适用浏览器:360、FireFox、Chrome、Safari、Opera、傲游、搜狗、世界之窗等新版浏览器。</p>
<p>来源:<a href="http://hovertree.com" target="_blank">何问起</a> <a href="http://hovertree.com/texiao/">特效</a> <a href="http://hovertree.com/h/bjaf/switchpage.htm">原文</a></p>
</div> </div>
<div class="section" id="section1">
<div class="intro">
<h1 class="title">Section Two</h1>
<p>This is Section Two. keleyi.com</p>
<img src="http://hovertree.com/texiao/jquery/68/images/hovertree1.jpg" alt="代码"/>
</div>
</div>
<div class="section" id="section2">
<div class="intro">
<h1 class="title">Section Three</h1>
<p>This is Section Three</p>
<pre class="hovertreecode"><span style="color: #008000;">/*</span><span style="color: #008000;">
使用代码
by 何问起
</span><span style="color: #008000;">*/</span><span style="color: #000000;">
$(</span><span style="color: #0000ff;">function</span><span style="color: #000000;">(){
$(</span>"#container"<span style="color: #000000;">).switchPage({
</span>'loop' : <span style="color: #0000ff;">true</span><span style="color: #000000;">,
</span>'keyboard' : <span style="color: #0000ff;">true</span><span style="color: #000000;">,
</span>'direction' : 'horizontal'<span style="color: #000000;">
});
});</span></pre>
</div>
</div>
</div> <script src="http://down.hovertree.com/jquery/jquery-2.2.3.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/switchPage.js"></script>
<script type="text/javascript">
$(function(){
$("#container").switchPage({
'loop' : true,
'keyboard' : true,
'direction' : 'horizontal'
});
});
</script> </body>
</html>
转自:http://hovertree.com/h/bjaf/switchpage.htm
特效汇总:http://www.cnblogs.com/roucheng/p/texiao.html
jQuery鼠标滚动垂直全屏切换代码的更多相关文章
- jquery横向纵向鼠标滚轮全屏切换
html <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF- ...
- js实现网页全屏切换(平滑过渡),鼠标滚动切换
实现效果为页面平滑过渡全屏切换,点击导航和鼠标滚动都可以切换. 效果图: html代码: <!DOCTYPE html> <html> <head lang=" ...
- jQuery插件开发——全屏切换插件
这个插件包含三个部分:HTML结构.CSS代码和JS代码. HTML结构是固定的,结构如下: <!--全屏滚动--> <div class="fullpage-contai ...
- jquery简单的大背景banner图片全屏切换
详细内容请点击 这个是我初毕业刚进公司那会帮同事(同时也是同学)写的一个PC端的全屏图片切换效果,对于刚毕业的我来说写出来那会的喜悦之情是无法言表的,那时的我还是什么不懂的小白白,俗称菜鸟.个人网站上 ...
- 基于jQuery带进度条全屏图片轮播代码
基于jQuery带进度条全屏图片轮播代码.这是一款基于jQuery实现的oppo手机官网首页带进度条全屏图片轮播特效.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div ...
- jQuery 扩展 全屏切换
(function ($) { //全屏切换方法 $.fn.toggleFullScreen = function (qp1, qp2) { var fullFlag = false; var _qp ...
- 原生JS实现全屏切换以及导航栏滑动隐藏及显示——重构前
思路分析: 向后滚动鼠标滚轮,页面向下全屏切换:向前滚动滚轮,页面向上全屏切换.切换过程为动画效果. 第一屏时,导航栏固定在页面顶部,切换到第二屏时,导航条向左滑动隐藏.切换回第一屏时,导航栏向右滑动 ...
- js 鼠标滚动到某屏时,加载那一屏的数据,仿京东首页楼层异步加载模式
js用处:在做商城时,首页图片太多,严重影响首页打开速度,所以我们需要用到异步加载楼层.js名称:鼠标滚动到某屏时,加载那一屏的数据,仿京东首页楼层模式js解释:1.用于商城的楼层内容异步加载,滚动条 ...
- 基于Ascensor.js全屏切换页面插件
今天给大家分享一款基于Ascensor.js全屏切换页面插件,这款实例 适用浏览器:IE8.360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之窗.效果图如下: 在线预览 ...
随机推荐
- 你的应用是如何被替换的,App劫持病毒剖析
一.App劫持病毒介绍 App劫持是指执行流程被重定向,又可分为Activity劫持.安装劫持.流量劫持.函数执行劫持等.本文将对近期利用Acticity劫持和安装劫持的病毒进行分析. 二.Activ ...
- Lesson 11 One good turn deserves another
Text I was having dinner at a restaurant when Tony Steele came in. Tony worked in a layer's office y ...
- 剑指Offer面试题:20.栈的压入、弹出序列
一.题目:栈的压入.弹出序列 题目:输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否为该栈的弹出顺序.假设压入栈的所有数字均不相等.例如序列1.2.3.4.5是某栈的压栈序列,序列4 ...
- 从零3D基础入门XNA 4.0(2)——模型和BasicEffect
[题外话] 上一篇文章介绍了3D开发基础与XNA开发程序的整体结构,以及使用Model类的Draw方法将模型绘制到屏幕上.本文接着上一篇文章继续,介绍XNA中模型的结构.BasicEffect的使用以 ...
- Inter Core CPU 型号的尾字母含义
Inter Core CPU 型号的尾字母含义: M:表示移动处理器(Mobile Processor):QM:四核移动处理器(Quad Mobile Processor):U:超低电压处理器(Ult ...
- MySQL数据库数据存放位置修改
MySQL数据库数据存放位置修改 MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于 Oracle 旗下产品.MySQL 最流行的关系型数据库管理系统,在 WEB 应用方 ...
- Eos开发——ajax请求
function saveData(){ form.validate(); if(form.isValid()==false) return; var persons = grid.getChange ...
- 详解Java中ArrayList、Vector、LinkedList三者的异同点(转)
本文转自http://my.oschina.net/zzw922cn/blog/491631 一.ArrayList ArrayList是一个可以处理变长数组的类型,这里不局限于“数”组,ArrayL ...
- SAE学习-使用SAE的Storage服务存储图片
看到园子里面有同学写了一篇<基于PHP实现阿里云开放存储服务>,围观地址:http://www.cnblogs.com/nosqlcoco/p/3474773.html.想起自己也在Sin ...
- T-SQL:毕业生出门需知系列(目录)
一.前言: 作为一个应届毕业生又要准备面试 ASP.NET 攻城狮了,以前在图书馆觉得这本书讲得挺基础,这次回家就自己买了本用来复习,顺便做下读书笔记. 第4版 二.代码下载: 官方:http://f ...