• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Working with Colors and Backg... > Using the Background Shorthand Prope...

Using the Background Shorthand Property

In CSS, the background shorthand property can be used to set any of the other background properties (background-color, background-image, background-repeat, background-attachment, and background-position). The background property first sets all of the background properties to their initial values and then assigns any explicit values stated in the declaration. For instance, the previous example of setting multiple background properties can be reduced to a single background property in this manner:

body {  color: rgb(153,0,0); background: rgb(238,238,213) url("watermark.gif") no-
repeat 50% 5em fixed; }


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint