Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

background-attachment

3 tags 1 category

The background-attachment CSS property sets whether a background image’s position is fixed within the viewport, or scrolls with its containing block.

Values: This property is specified as one or more comma-separated keyword values:

Values: fixed The background is fixed relative to the viewport. Even if an element has a scrolling mechanism, the background doesn’t move with the element. If set, the background-origin property is ignored. local The background is fixed relative to the element’s contents. If the element has a scrolling mechanism, the background scrolls with the element’s contents, and the background painting area and background positioning area are relative to the scrollable area of the element rather than to the border framing them. scroll The background is fixed relative to the element itself and does not scroll with its contents. (It is effectively attached to the element’s border.)

Syntax example: background-attachment: scroll;

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…