CSS background-attachment Property
To set the attachment of the background to the element.
Definition and Notes.
1. The CSS background-attachment property specifies how the background-image reacts when the page is scrolled.
2. The background-image can either scroll along with the rest of the content or remain static.
CSS background-attachment property.
View in Splitscreen»
Code-Editor:Note-For a paged media, where there isn't a viewport, a 'fixed' background is with respect to the page box and hence replicated on all pages.
|scroll||To make the background to scroll along with the element.|
|fixed||To make the background fixed at a position relative to the browser's viewport|
|local||The background is fixed in relation to element's content.If the element has a scroll bar the background scrolls along with the content.|
|Initial Value||Same as Individual Properties.|
|Applies to||all elements.|