You are here : cssCSS 3background-attachment

background-attachment - CSS 3

The background-attachment property sets whether a background image is fixed or scrolls with the rest of the page.


Syntax

background-attachment: scroll|fixed|local|initial|inherit;


Example

body {
    background-image: url('w3css.gif');
    background-repeat: no-repeat;
    background-attachment: fixed;
}


Output / Return Value


Limitations


Alternatives / See Also


Reference