This property determines whether the background image assigned to an element scrolls in sync with the element's content or remains fixed in relation to the browser window. For example, if you wanted the top-left corner of your page background image to remain in the top-left corner of the browser window, even as the page was scrolled, you would set background-attachment to fixed.
Inherited: No
See also: Section B.5background-image
fixed or scroll
Initial value: scroll
CSS Version: 1
Supported by Internet Explorer 4 or later, Netscape 6 or later, Opera 5 or later, and all Mozilla browsers.
Internet Explorer for Windows (at least up to version 6) and Opera browsers (up to version 6), do not correctly support background-attachment: fixed on elements besides body. Opera 7, Internet Explorer 5 for Macintosh, Netscape 6.2.1 or later, and Mozilla browsers all get this right.
This style rule applies a background image to the page and specifies that the image should not scroll with the page content:
body { background-image: url(/images/texture.gif); background-attachment: fixed; }