-
May 21st, 2020, 03:24 AM
#1
Thread Starter
Member
about background and colour
Why background and color are the separate properties if they should always be set together?
< advertising removed by moderator >
-
Jun 16th, 2020, 10:54 AM
#2
Re: about background and colour
Background and Color are separate properties and you can set one without the other. Per MDN, here are the descriptions of the two:
Background:
The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method.
Color
The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value. currentcolor may be used as an indirect value on other properties and is the default for other color properties, such as border-color.
-
Jun 18th, 2020, 03:54 AM
#3
New Member
Re: about background and colour
The background property is a complex property in CSS, and if it is combined with color, the complexity will further increase. Color is an inherited property while the background is not. So this can make confusion further.
**Links removed by Site Administrator so it doesn't look like you're spamming us. Please don't post them again.**
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|