Is Background-Color: None Valid Css?
Can Anyone Tell Me If the Following Css Is Valid? .Class { Background-Color: None; } 2 7 Answers You Probably Want Transparent as None Is Not a Valid...
Can anyone tell me if the following CSS is valid?
.class {
background-color:none;
}
7 Answers
You probably want transparent as none is not a valid background-color value.
The CSS 2.1 spec states the following for the background-color property:
Value: <color> | transparent | inherit
<color> can be either a keyword or a numerical representation of a colour. Valid color keywords are:
aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, orange, purple, red, silver, teal, white, and yellow
transparent and inherit are valid keywords in their own right, but none is not.
No, use transparent instead none . See working example here in this example if you will change transparent to none it will not work
use like .class { background-color:transparent; }
Where .class is what you will name your transparent class.
The answer is no.
Must Read
Incorrect
.class {
background-color: none; /* do not do this */
}