Css background缩写

例子:url

background:url(../images20130624/bg.png) no-repeat -1424px -5px;element

官方APIit

Value: ['background-color'> ||<'background-image'> || <'background-repeat'>|| <'background-attachment'> ||<'background-position'>] | inherit
Initial: see individual properties
Applies to: all elements
Inherited: no
Percentages: allowed on 'background-position'
Media: visual
Computed value: see individual propertiesio

 

background属性的值的书写顺序官方并无强制标准的。
为了可读性,定一个CSS书写规范,规则2.1:background的值的顺序是background-color,background-image,background-repeat,background-attachment,background-position。im

相关文章
相关标签/搜索