CSS 中的 `lightgrey` 和 `lightgray` 有什么区别?
What is the difference between `lightgrey` and `lightgray` in CSS?
我正在使用 Microsoft Visual Studio 2012 来编辑我的 CSS。当我想使用浅灰色时,IntelliSense 建议我这样做:
有区别吗?
根据CSS3 Color,没有区别:
┌────────────┬─────────┬─────────────┐
│ Color name │ Hex rgb │ Decimal │
├────────────┼─────────┼─────────────┤
│ lightgray │ #d3d3d3 │ 211,211,211 │
│ lightgrey │ #d3d3d3 │ 211,211,211 │
└────────────┴─────────┴─────────────┘
它们的颜色完全一样,check this article for more information.
Gray is the more popular spelling in the US, while grey reigns supreme
in the UK.
太令人困惑了,我认为这是 IntelliSense 字典问题,在美国字典中拼写为 LIGHTGRAY,在英国字典中拼写为 LIGHTGREY。但它应该给出相同的颜色值。
我发现在 IE7 中 "lightgrey" 映射到浅 grey/gray 颜色,但 "lightgray" 映射到较暗的 grey/gray。因此,我建议您使用 rgb 值在旧版浏览器中获得您想要的颜色。
en-US:
.foo { color: gray; }
en-UK
.foo { colour: grey; }
因为不支持colour
,所以使用gray
lightgray
不支持IE≤7; lightgrey
虽然支持。
这就是区别。
我正在使用 Microsoft Visual Studio 2012 来编辑我的 CSS。当我想使用浅灰色时,IntelliSense 建议我这样做:
有区别吗?
根据CSS3 Color,没有区别:
┌────────────┬─────────┬─────────────┐
│ Color name │ Hex rgb │ Decimal │
├────────────┼─────────┼─────────────┤
│ lightgray │ #d3d3d3 │ 211,211,211 │
│ lightgrey │ #d3d3d3 │ 211,211,211 │
└────────────┴─────────┴─────────────┘
它们的颜色完全一样,check this article for more information.
Gray is the more popular spelling in the US, while grey reigns supreme in the UK.
太令人困惑了,我认为这是 IntelliSense 字典问题,在美国字典中拼写为 LIGHTGRAY,在英国字典中拼写为 LIGHTGREY。但它应该给出相同的颜色值。
我发现在 IE7 中 "lightgrey" 映射到浅 grey/gray 颜色,但 "lightgray" 映射到较暗的 grey/gray。因此,我建议您使用 rgb 值在旧版浏览器中获得您想要的颜色。
en-US:
.foo { color: gray; }
en-UK
.foo { colour: grey; }
因为不支持colour
,所以使用gray
lightgray
不支持IE≤7; lightgrey
虽然支持。
这就是区别。