0

background VS background-color

Is there a difference between "background: green" and "background-color: green"?

29th Jan 2017, 8:40 PM
Maxim Velichkin
Maxim Velichkin - avatar
2 Réponses
+ 11
"background-color" is a property of "background"
29th Jan 2017, 9:20 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
'background' is shorhand property for background family properties, so you can shortcut 'background-color:green;' by 'background:green;'... The only restriction, is to take care of previous rules for background properties, which can be overwritting by a generic rule to set only certains properties ^^
30th Jan 2017, 5:57 AM
visph
visph - avatar