Menu Samaritan's Purse

BACKGROUND-ATTACHMENT

The background-attachment property specifies whether background images are fixed with regard to the viewport (fixed), or scroll along with the element (scroll), or its contents (local).

SYNTAX

CSS

background-attachment: value;

JS

object.style.backgroundAttachment = "value";

VALUES

<'background-attachment'> = <attachment>#
<attachment> = scroll | fixed | local
scroll

The background is fixed with regard to the element itself.

fixed

The background is fixed with regard to the viewport.

local

The background is fixed with regard to the element's contents.

INITIAL

scroll

EXAMPLES

FIXED

LOCAL

SCROLL

JS

INTERNAL

background

background-clip

background-color

background-image

background-position

background-repeat

EXTERNAL

World Wide Web Consortium (W3C)