是background-color:none有效的CSS吗? [英] Is background-color:none valid CSS?
问题描述
任何人都可以告诉我以下CSS是否有效?
.class {
background-color:none ;
}
$ c> transparent 作为 none
不是有效的 background-color
p>
CSS 2.1规范为 background-color
属性指定以下内容:
值:< color> |透明|继承
< color>
关键字或颜色的数字表示。 有效的颜色
关键字是:
aqua,黑色,蓝色,紫红色,灰色,绿色,紫色,红色,银色,蓝绿色,白色和黄色
transparent
inherit
是有效的关键字,但 none
不是。
Can anyone tell me if the following CSS is valid?
.class {
background-color:none;
}
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.
这篇关于是background-color:none有效的CSS吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!