CSS Background-repeat Property

SQL     Data Warehousing     CSS     PHP     HTML     Database Normalization


CSS Tutorial  >  Background   >   Background-repeat

The background-repeat property specifies whether a background image repeats itself. The default is "repeat", which means repeating the image in both the x- and y- directions. You can also specify x-repeat, y-repeat, or no-repeat.

Examples below:

CSS DeclarationOutput

p {
  background-image:url(yp.jpg);
  background-repeat: no-repeat;
}

Background does not repeat.


p {
  background-image:url(yp.jpg);
  background-repeat: repeat-x;
}

Background repeats horizontally.


p {
  background-image:url(yp.jpg);
  background-repeat: repeat-y;
}

Background repeats vertically.


p {
  background-image:url(yp.jpg);
  background-repeat: repeat;
}

Background repeats in both directions.


Next: CSS Color




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