CSS Background-attachment Property

SQL     Data Warehousing     CSS     PHP     HTML     Database Normalization


CSS Tutorial  >  Background   >   Background-attachment

The background-attachment property specifies whether a background stays fixed on the screen. Possible values are "fixed" (background stays in the same place when scrolling) and "scroll" (background moves with the rest of content when scrolling).

Below are two examples:

body {background-attachment: fixed;
  background-image: url("yp.jpg");
  background-repeat: no-repeat;
}
body {background-attachment: scroll;
  background-image: url("yp.jpg");
  background-repeat: no-repeat;
}

Next: CSS Background-Color




Copyright © 2014   1keydata.com   All Rights Reserved   Privacy Policy   About   Contact