这个问题在这里已经有了答案:
是否有'箱子阴影颜色'属性? 6个答案如果没有指定* box-shadows,默认的颜色是什么?
-webkit-box-shadow: 4px 4px 5px; -moz-box-shadow: 4px 4px 5px; box-shadow: 4px 4px 5px;我如何分别设置颜色? (根据是否有'box-shadow-color'属性?不存在诸如* box-shadow-color之类的东西......)
This question already has an answer here:
Is there a 'box-shadow-color' property? 7 answersWhat color do the *box-shadows default to if none is specified?
-webkit-box-shadow: 4px 4px 5px; -moz-box-shadow: 4px 4px 5px; box-shadow: 4px 4px 5px;How can I set that color separately? (According to Is there a 'box-shadow-color' property? there isn't a thing such as *box-shadow-color ...)
最满意答案
请参阅: https : //developer.mozilla.org/en/css/box-shadow
<color> (可选) 有关可能的关键字和符号,请参阅<color>值。 如果未指定,颜色取决于浏览器。 在Gecko(Firefox)中,使用了color属性的值。 如果省略<color>则WebKit的阴影是透明的,因此无用。
您只能在 box-shadow设置颜色,例如:
box-shadow: 4px 4px 5px #ccc;您无法单独设置它,因为正如您所指出的那样,不存在box-shadow-color属性。
See: https://developer.mozilla.org/en/css/box-shadow
<color> (optional) See <color> values for possible keywords and notations. If not specified, the color depends on the browser. In Gecko (Firefox), the value of the color property is used. WebKit's shadow is transparent and therefore useless if <color> is omitted.
You can only set the color inside box-shadow, for example:
box-shadow: 4px 4px 5px #ccc;You simply can't set it separately, because as you pointed out, no box-shadow-color property exists.
更多推荐
发布评论