position:
值 | 描述 |
---|---|
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 |
inherit | 指定background-position属性设置应该从父元素继承 |
origin:
值 | 描述 |
---|---|
padding-box | 背景图像填充框的相对位置(默认值) |
border-box | 背景图像边界框的相对位置 |
content-box | 背景图像的相对位置的内容框 |