默认框阴影颜色?(Default box shadow color? [duplicate])

编程入门 行业动态 更新时间:2024-10-28 10:32:24
默认框阴影颜色?(Default box shadow color? [duplicate])

这个问题在这里已经有了答案:

是否有'箱子阴影颜色'属性? 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 answers

What 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.

更多推荐

本文发布于:2023-08-05 10:06:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1431268.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:阴影   颜色   Default   box   color

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!