背景图片属性(background-image)
在HTML中为设定背景图片,
<body style="background-image:url(../image/css_tutorials/background.jpg)">
背景重复属性(background-repeat)
这个属性和background-image属性一起使用,决定背景图片是否重复。如果只设置background-image属性,没设置background-repet属性,图片就会横向重复又竖向重复。
repeat-X横向重复
repeat-Y竖向重复
no-repeat图片不重复
body {"background-image:url(../image/css_tutorials/background.jpg);background-repeat:repeat-Y>
上面的代码表示图片为竖向重复
背景附着属性(background-attachment)用来控制背景图片是否固定不动,还是滚动
background-attachment:scroll 滚动的
background-attachment:fixed 固定的