From http://www.w3schools.com (Copyright Refsnes Data)
The background-attachment property sets whether a background image is fixed or scrolls with the rest of the page.
Inherited: No
CSS properties can also be dynamically changed with a JavaScript.
Scripting Syntax: object.style.backgroundAttachment="fixed"
In our HTML DOM tutorial you can find more details about the backgroundAttachment property.
In our HTML DOM tutorial you can also find a full Style Object Reference.
body |
Value | Description |
---|---|
scroll | Default. The background image moves when the rest of the page scrolls |
fixed | The background image does not move when the rest of the page scrolls |
How to set a fixed
background image
This example demonstrates how to set a fixed background image. The image will
not scroll with the rest of the page.
From http://www.w3schools.com (Copyright Refsnes Data)