HTML中background-repeat 重复背景图属性的的作用
body{
background-image: url(/i/eg_bg_03.gif);
background-repeat: repeat;
}
主要是用于,当所加载的背景图片的尺寸没有做够大的时候,即使用background-repeat:no-repeat;的时候在页面中显示的尺寸大小。
若要使用background: “图片路径”;时则会整个页面都是是路径图片,不会有重复的效果。
水平重复,background-repeat:no-repeat;
使用background-repeat属性,可以水平、垂直、整个页面,重复背景图。
水平重复,background-repeat:repeat-x;
垂直方向重复,background-repeat:repeat-y;
重复,background-repeat:repeat;