Name

backgroundAttachment — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

Sets how the image is “attached” to the element. The image can either remain fixed within the viewable area of the element (the viewport) or it may scroll with the element as the document is scrolled. During scrolling, the fixed attachment looks like a stationary backdrop to rolling credits of a movie.

Example

document.all.tags("DIV").style.backgroundAttachment = "fixed"

Value

String of either allowable value: fixed | scroll.

Default

scroll

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.