http://www.w3school.com.cn/cssref/pr_background.asp
div
{
background: #f1f1f1 url(files/pro_left.png) center right no-repeat;
}
可以设置如下属性:
background:url(img_flwr.gif);
background-color 规定要使用的背景颜色。
background-position 规定背景图像的位置。
background-size 规定背景图片的尺寸。
background-repeat 规定如何重复背景图像。
background-origin
background-clip
background-attachment
background-image
-----------background-position 规定背景图像的位置---------------
格式:x y
top ypos
left xpos
right xpos
bottom ypos
center
x% y%
xpos ypos
--示例
background-position:center right 4px;