13.07.2015 Views

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

Beginning CSS: Cascading Style Sheets for Web Design, 2nd ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 10: BackgroundsFigure 10-14How It WorksIn Example 10-5, you recapped the background-attachment property with another brief demonstrationof what it does. Using the background-attachment property, you can position images relative tothe element, even if they are applied to elements or elements or elements.When the background-attachment: fixed; declaration is provided, the background image is alwayspositioned relative to the element, regardless of what element the background image is appliedto. The background image also remains fixed in place as the content within the document is scrolled.One use <strong>for</strong> this effect is to provide effects that mimic and give the illusion of transparency.In the next section, I describe how to simplify the plethora of separate background properties into justone property using the background shorthand property.The background shorthand PropertyLike the shorthand properties I introduced in previous chapters, the background property combineseach of the individual background properties into a single property. The following table outlines the valuesallowed by the background property.365

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!