Name

background-attachment — IE4 Y/Y | IE5 Y/Y | NN4 N/N | Op3 N/-

Synopsis

This property defines whether or not the background image scrolls along with the element. This is generally applied to BODY only, and in fact is largely supported only for that element. It is theoretically possible to create “aligned” backgrounds in multiple elements using this property; see Chapter 6 for more details.

Example

BODY {background-attachment: scroll;}
DIV.fixbg {background-attachment: fixed;}

Values

scroll | fixed

Default

scroll

Inherited

no

Applies to

all elements

Get Cascading Style Sheets: The Definitive Guide 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.