phpNoob
phpNoob

Reputation: 249

Not clear on one attribute value in shorthand version of background property?

background: url(/rsrc.php/v2/yB/r/TwAHgQi2ZPB.png) 0 bottom repeat-x;

Can anyone tell what the 0 specifies in above property's value?

Upvotes: 1

Views: 44

Answers (1)

Harry
Harry

Reputation: 89770

As you can see in the below screenshot, the 0 refers to the background-position. A unit need not be provided if the value is 0 and the browser automatically assigns the unit to it.

To be more precise it refers to X coordinate of the background-position or background-position-x.

Screenshot from Chrome's Dev Console:

enter image description here

Screenshot from Firefox's Dev Console:

enter image description here

Screenshot from Edge's Dev Console:

enter image description here

Upvotes: 2

Related Questions