Validity of "background-color: none" in CSS
In CSS, the validity of "background-color: none;" has been a subject of debate. Let's delve into the matter to find out if it is indeed a valid declaration.
The CSS 2.1 specification clearly outlines the possible values for the "background-color" property:
According to this specification, "
Therefore, the declaration "background-color: none;" is not valid CSS. If you intend to make an element's background transparent, the appropriate value is "transparent."
The above is the detailed content of Is 'background-color: none;' a Valid CSS Declaration?. For more information, please follow other related articles on the PHP Chinese website!