+ 1

Background

In CSS, is there a difference between "background", and background-color "?

9th Jul 2017, 7:55 PM
Arroudj Abderrahim
Arroudj Abderrahim - avatar
2 odpowiedzi
+ 4
'background' is a shorthanded property where you can not only set the 'background-color' property, but also 'background-image' as mostly of those 'background-' family properties... https://developer.mozilla.org/en-US/docs/Web/CSS/background
9th Jul 2017, 8:48 PM
visph
visph - avatar
+ 1
The value of 'background' can also be an image. ( 'url(http://...)' ). The value of 'background-color' can only be a color.
9th Jul 2017, 8:06 PM
Jonas Geiler
Jonas Geiler - avatar