Background - Shorthand property

<pre><code>//the shorthand property for background is background

body {
  background: #ffffff url(&quot;img_tree.png&quot;) no-repeat right top;
}</code></pre>
  • To shorten the code, it is also possible to specify all the background properties in one single property. This is called a shorthand property.
  • When using the shorthand property the order of the property values is: background-color, background-image, background-repeat, background-attachment, background-position.
  • It does not matter if one of the property values is missing, as long as the other ones are in this order.

Background - Shorthand property — Structure map

Clickable & Draggable!

Background - Shorthand property — Related pages: