关于background-origin的属性认识

2016-04-27  本文已影响295人  高级民工

                  

可能有很多小伙伴想对自己的背景图做一些"手脚",所以介绍一些css3中关于background-origin的东西.

background-origin 属性规定 background-position 属性相对于什么位置来定位。

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

padding-box 背景图像相对于内边距框来定位

border-box 背景图像相对于边框盒来定位(前提你有边框!!!)

content-box 背景图像相对于内容框来定位

上一篇 下一篇

猜你喜欢

热点阅读