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 CSS Foundations Backgrounds and Borders Background Properties

Zoe Xiao
Zoe Xiao
7,195 Points

Backgrounds 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
Steven Deutsch
21,046 Points

Hey 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!

Zoe Xiao
Zoe Xiao
7,195 Points

Hi thanks for your explanation but you may forget the first sentence...it doesn't allow the background image scroll with the element?

Steven Deutsch
Steven Deutsch
21,046 Points

Hey 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
Zoe Xiao
7,195 Points

Thanks buddy But I am still wondering whether the background image scrolls with the containing element instead of the content under both values...