常用的是:
第一种:
left top
left center
left bottom
right top
right center
right bottom
center top
center center
center bottom
如果仅指定一个关键字,其他值将会是"center";
第二种:
x% y%
第一个值是水平位置,第二个值是垂直。左上角是0%0%。右下角是100%100%。如果仅指定了一个值,其他值将是50%。默认值为:0%0%
第三种:
xpos ypos
第一个值是水平位置,第二个值是垂直。左上角是0。单位可以是像素(0px0px)或任何其他css单位。如果仅指定了一个值,其他值将是50%。你可以混合使用%和positions
例如:
background:rgba(0,0,0,0.7) url("../images/ruleBG.png") no-repeat 0 50px;
background-size: 100% auto;