Fandom

Background

648pages on
this wiki
Add New Page
Comments0 Share

The background property is used in CSS and certain HTML elements. It is a shorthand property for setting the individual background property values in a single place in the style sheet. This property can be used to set the values for one or more of: background-color, background-image, background-repeat, background-position, background-size, and/or background-attachment.


ValuesEdit

Any values from the background-color, background-image, background-repeat, background-position, and background-attachment properties can be used in the background property. A single space is used to separate each individual value.


HTML example:

<body style="background: #000 url(http://images1.wikia.nocookie.net/__cb20100810165854/htmlcss/images/f/fb/HtmlcssBG.png) repeat-y center;">
Body content.
</body>


CSS example:

body {
      background: #000 url(http://images1.wikia.nocookie.net/__cb20100810165854/htmlcss/images/f/fb/HtmlcssBG.png) repeat-y center;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.