例子:

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。

相关文章:

  • 2021-10-04
  • 2021-05-21
  • 2022-12-23
  • 2021-12-06
  • 2021-06-21
  • 2022-01-04
  • 2022-12-23
猜你喜欢
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-09-23
  • 2021-09-11
相关资源
相似解决方案