CSS Background-attachment Property

Posted The: 23/04/2008 At: 21:51

Last Edited: 15/08/2008 At: 18:32

The background-attachment property sets the attachment of the background. It is often used to "fix" the background, instead of having it scroll togetter with the content.

Possible Values

  1. fixed
  2. scroll (Default)

Example:

The following example first sets a background-image, and then sets its attachment to fixed.

body {
  background-image: url("MyImage.png");
  background-attachment: fixed;
}

Inherited? - NO!

Comments: [0]

© Brugbart Webdesign