例子:

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

官方API

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 properties

 

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

posted on 2016-09-30 12:26  coder_yuan  阅读(2053)  评论(0编辑  收藏  举报