Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

How do you make a background look like this one?

Hi all, I really like this new style of site. http://brookandlyn.com/fieldtrip/#intro

Does anyone know how you can get a background to switch like this as you scroll down?

many thanks, Max

2 Answers

In the case of this website it's done by making a div with the image displayed inside of it, then including a few lines of javascript ( viewable here: http://brookandlyn.com/fieldtrip/js/custom.js ) to make it scroll.

I like the effect but I think, if it had been my project, I would have made the text overlay the image rather than let it hang in white space below each one.

I think this effect is called parallax scrolling.

Here are a few more websites: http://www.awwwards.com/30-great-websites-with-parallax-scrolling.html

On thing I have noticed from a couple I have try it does not work on an iPad. So probably the same with iPhone and iPod.