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 trialZoe Xiao
7,195 PointsBackgrounds and Borders Quiz
__ doesn't allow the background image scroll with its containing element, but allows it to scroll with the element's content. The answer is local. Why? I think it must be scroll if I don't misunderstand the question.
2 Answers
Steven Deutsch
21,046 PointsHey Zoe,
The answer is local because when this value is used with the background-attachment property it causes the background to scroll along with the element's contents. The scroll property, on the other hand, causes the background to scroll along with the element itself.
For more information on the background-attachment property you should check out W3Schools
Hope I clarified things! Good luck!
Steven Deutsch
21,046 PointsHey Zoe, I created a quick visual in codepen so you can see the difference between using "local" and "scroll". I hope this helps and that I'm explaining it right! You can view it here!
Zoe Xiao
7,195 PointsThanks buddy But I am still wondering whether the background image scrolls with the containing element instead of the content under both values...
Zoe Xiao
7,195 PointsZoe Xiao
7,195 PointsHi thanks for your explanation but you may forget the first sentence...it doesn't allow the background image scroll with the element?