Syntax |
- color is specified by using a color-value or one of the following keywords: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, yellow, or transparent.
- image is specified by using a URI or the keyword none.
- repeat is specified by using one of the following keywords: repeat, repeat-x, repeat-y, or no-repeat.
- attachment is specified by using one of the following keywords: scroll or fixed.
- color, image, repeat, attachment, and background-position are all OPTIONAL but at least one of them must occur.
(OR)
selector {background: value;}
- value is specified by using the keyword inherit.
|
Keywords |
- color keywords:
- aqua - aqua = #00ffff = rgb(0,255,255)
- black - black = #000000 = rgb(0,0,0)
- blue - blue = #0000ff = rgb(0,0,255)
- fuchsia - fuchsia = #ff00ff = rgb(255,0,255)
- gray - gray = #808080 = rgb(128,128,128)
- green - green = #008000 = rgb(0,128,0)
- lime - lime = #00ff00 = rgb(0,255,0)
- maroon - maroon = #800000 = rgb(128,0,0)
- navy - navy = #000080 = rgb(0,0,128)
- olive - olive = #808000 = rgb(128,128,0)
- orange - orange = #ffa500 = rgb(255,165,0)
- purple - purple = #800080 = rgb(128,0,128)
- red - red = #ff0000 = rgb(255,0,0)
- silver - silver = #c0c0c0 = rgb(192,192,192)
- teal - teal = #008080 = rgb(0,128,128)
- white - white = #ffffff = rgb(255,255,255)
- yellow - yellow = #ffff00 = rgb(255,255,0)
- transparent - The background color under the element is visible.
- image keyword:
- none - Do not display a background image.
- repeat keywords:
- repeat (Repeat the background image horizontally and vertically.)
- repeat-x (Repeat the background image horizontally.)
- repeat-y (Repeat the background image vertically.)
- no-repeat (Do not repeat the background image.)
- attachment keywords:
- scroll - Background image will scroll along with the web page.
- fixed - Background image is fixed and will not scroll.
- inherit - A single inherit keyword is used to specify that the values for this property should be taken from the parent element. If inherit is used with the root element, then the initial values for this property will be used. When the inherit keyword is used, no other property values are allowed.
|