CSS3 background-origin:border-box|padding-box|content-box

浏览器参照基准:Firefox3.6 and Later, Chrome5 and Later, Safari5 and Later, Opera11.50 and Later, IE9.0 and Later

* 用于指定background-position计算的参考位置。默认值为padding-box,IE下的一般标记默认表现等同于border-box(hasLayout的标记或一般标记被触发hasLayout时,表现等同于padding-box)

背景起源(以border(即包括border)为原点计算背景图的background-position):

#background-origin-border{
	-moz-background-origin:border-box;         /* For Firefox */
	-webkit-background-origin:border-box;      /* For Chrome, Safari */
	-o-background-origin:border-box;           /* For Opera */
	-ms-background-origin:border-box;          /* For IE */
	background-origin:border-box;              /* For Future */
}

背景起源(以padding(即包括padding)为原点计算背景图的background-position):

#background-origin-padding{
	-moz-background-origin:padding-box;         /* For Firefox */
	-webkit-background-origin:padding-box;      /* For Chrome, Safari */
	-o-background-origin:padding-box;           /* For Opera */
	-ms-background-origin:padding-box;          /* For IE */
	background-origin:padding-box;              /* For Future */
}

背景起源(以content(即从content开始)为原点计算背景图的background-position):

#background-origin-content{
	-moz-background-origin:content-box;         /* For Firefox */
	-webkit-background-origin:content-box;      /* For Chrome, Safari */
	-o-background-origin:content-box;           /* For Opera */
	-ms-background-origin:content-box;          /* For IE */
	background-origin:content-box;              /* For Future */
}
CSS探索之旅