The background-attachment property defines the whether a background image is fixed in relation to the canvas or if it scrolls allong with the surrounding content.
background-attachment in CSS Versions:
background-attachment: scroll | fixed | inherit
The standard, the image scrolls with the content.
The image is fixed in relation to the canvas and the content scrolls over it.
Repeat vertially only.
Do not repeat the image, display it only once.
The element should have the same background-attachment setting as the parent.
background-attachment Initial Value:
background-attachment Applies To:
This property is not inherited.
background-attachment Browser Support:
<p style="background-attachment : fixed; background-image : /library/graphics/purple.gif;"> This paragraph has the purple.gif image as a background that is fixed below the content. </p>
background-attachment Special Notes:
- The background-attachment property only reliably works in the <body> tag in many browsers.
- This style requires a background image set.