Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to achieve fixed position background scroll/reveal effect? jQuery plugin available?

I was wondering if anyone knows if there is a jquery plugin, or how to achieve this sort of effect that is visible on the 'collection' section of fashion label krystalrae.com

Screen Capture Video

Any tips or nudges in the right direction would be greatly appreciated!

Thank you!

like image 421
waffl Avatar asked Sep 04 '12 08:09

waffl


2 Answers

You can do this with CSS. All you need is some divs that are the same height as the window, with different background images with the property background-attachment: fixed;.

#one
{
    background: url(http://images.buzzillions.com/images_products/07/02/iron-horse-maverick-elite-mountain-bike-performance-exclusive_13526_100.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment:fixed;
}

#two
{
    background: url(http://img01.static-nextag.com/image/GMC-Denali-Road-Bike/1/000/006/107/006/610700673.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment:fixed;
}

http://jsfiddle.net/Kyle_/mbhLN/

like image 114
Kyle Avatar answered Oct 23 '22 09:10

Kyle


HERE you will find your plugin!

It is Parallax effect.

like image 25
Andrea Turri Avatar answered Oct 23 '22 10:10

Andrea Turri