background

字號:


    語法:
    background : background-color || background-image || background-repeat || background-attachment || background-position
    取值:
    該屬性是復(fù)合屬性.請參閱各參數(shù)對應(yīng)地屬性.
    默認值為:transparent none repeat scroll 0% 0%.
    說明:
    設(shè)置對象地背景樣式.
    如使用該復(fù)合屬性定義其單個參數(shù),則其他參數(shù)地默認值將無條件覆蓋各自對應(yīng)地單個屬性設(shè)置.
    例如:設(shè)置 background : white 等于設(shè)置 background : white none repeat scroll 0% 0% .如果在此之前設(shè)置了 background-image 屬性,則其設(shè)置將被 background-image 地默認值 none 覆蓋.
    背景樣式屬性地作用區(qū)域為對象地內(nèi)容區(qū)域與內(nèi)補丁( padding )區(qū)域.不包括邊框( border )與外補丁( margin )區(qū)域.盡管該屬性不可繼承,但如果未指定,其父對象地背景顏色和背景圖將在對象下面顯示.
    對應(yīng)地腳本特性為 background .
    示例:
    div { background: red no-repeat scroll 5% 60%; }
    body { background: url(images/aardvark.gif) repeat-y; }
    pre { background: url(images/aardvark.gif) top; }
    caption { background: fuchsia; }