该CSS属性是一个复合属性,是5个背景属性 background-color, background-image, background-repeat, background-attachment 和 background-position 的综合快捷写法。背景所涉及的是 content 和 padding 区域,请参见 CSS 盒子模式 (Box Model) 。
值:[<'background-color'> || <'background-image'> || <'background-repeat'> || <'background-attachment'> || <'background-position'>] | inherit
可用值 | 值的说明 |
color | background-color 的属性值 |
image | background-image 的属性值 |
repeat | background-repeat 的属性值 |
attachment | background-attachment 的属性值 |
position | background-position 的属性值 |
该CSS属性的缺省值为 transparent none repeat scroll 0% 0%。
body {background:#99FF00 url(background.gif) no-repeat fixed 40px 100px}
否
所有元素