本文介绍了是background-color:none有效的CSS吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我以下CSS是否有效?

  .class {
background-color:none ;
}


解决方案

$ c> transparent 作为 none 不是有效的 background-color p>

是:

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:

<color> can be either a keyword or a numerical representation of a colour. Valid color keywords are:

transparent and inherit are valid keywords in their own right, but none is not.

这篇关于是background-color:none有效的CSS吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 12:22