# 懒人图库

此处为头部导航区域

## (Almost) Static Background

This section has a background that moves slightly slower than the user scrolls. This is achieved by changing the top position of the background for every pixel the page is scrolled.

## Multiple Backgrounds

The multiple backgrounds applied to this section are moved in a similar way to the first section -- every time the user scrolls down the page by a pixel, the positions of the backgrounds are changed.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nibh erat, sagittis sit amet congue at, aliquam eu libero. Integer molestie, turpis vel ultrices facilisis, nisi mauris sollicitudin mauris, volutpat elementum enim urna eget odio. Donec egestas aliquet facilisis. Nunc eu nunc eget neque ornare fringilla. Nam vel sodales lectus. Nulla in pellentesque eros. Donec ultricies, enim vitae varius cursus, risus mauris iaculis neque, euismod sollicitudin metus erat vitae sapien. Sed pulvinar.

## What Happens When JavaScript is Disabled?

The user gets a slap! Actually, all that jQuery does is moves the backgrounds relative to the position of the scrollbar. Without it, the backgrounds simply stay put and the user would never know they are missing out on the awesome! CSS2 does a good enough job to still make the effect look cool.

## Empty Containers vs CSS3 Multiple Backgrounds

This section only works in modern browsers that support multiple backgrounds.

The Nikebetterworld.com demo uses only CSS2 to create it's parallax effect. It uses empty containers in each section to give the impression of multiple backgrounds, which is the method I used for the image of the trainers. It's actually possible to achieve the same effect using CSS3s multiple backgrounds -- as I've done with the bubbles in this section, although, it will only work in modern browsers that support CSS3 multiple backgrounds.

The use of CSS3 means less markup and jQuery, making the script slightly quicker.

## I Wanna See More Amazing Things!

You might like to check out my other demos too:

- Original jQuery Vertical Parallax Demo
- BBC News jQuery Map
- jQuery Media Rich Dropdown Menu
- "Referrer Specific jQuery Greeting

Or go visit the official Nikebetterworld.com website that this demo is based on. It utilises a bunch of other cool technologies too!

## Credits

This demo makes use of some scripts and images made by others:

- jQuery Element 'in view' Event Plugin
- jQuery ScrollTo
- Licensed fonts from FontDeck
- Wooden and Pyschedlic Background Textures
- Trainers Image
- Basketball Image
- Sea Background
- Bottles Image
- Bubbles by myself, feel free to use them under the same license as this demo

P.S - You've scrolled 0 Pixels. Oh Yeah!

来源：ianlunn.co.uk代码整理：懒人图库感谢：wordpress Xcoder

＊尊重他人劳动成果，转载请自觉注明出处！注：此代码仅供学习交流，请勿用于商业用途。

jQuery纵向全屏滚动背景代码，右侧有多个白色导航圆点，点击可以跳转到相应的图片，并且支持鼠标滚轮。兼容主流浏览器，懒人图库推荐下载！

使用方法：

1、head区域引用文件 jquery.js，nbw-parallax.js, jquery.localscroll, jquery.scrollTo, jquery.inview, lrtk.css

2、在文件中加入<!-- 代码 开始 --><!-- 代码 结束 -->区域代码

3、复制images文件夹里的图片到相应的路径