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
Matthew Costigan
18,319 PointsHow do you make that picture effect under the nav bar when scrolling down on this website?
This is the website http://glcsolutions.ca/
1 Answer
Steven Parker
243,318 PointsI see two "effects" there.
I'm not sure which you're asking about. If you mean that the image doesn't move when you scroll, that's probably due to the CSS background-attachment property being set to "fixed".
If you mean how the text over the image fades as you scroll, that's probably some JavaScript code that triggers on the scroll event and then adjusts the opacity of the top layer based on the scroll position.
Or was it something else I didn't notice?