HTML / CSS中允许的颜色名称 [英] Color names allowed in HTML/CSS

查看:92
本文介绍了HTML / CSS中允许的颜色名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道并使用一些颜色名称,如白色,蓝色,红色,HTML / CSS是否允许使用完整的颜色列表?

I know and use a few color names like 'white', 'blue', 'red', is there a complete list of colors allowed in HTML/CSS ?

推荐答案

http:中列出了很多颜色: //www.w3schools.com/HTML/html_colornames.asp 。底部还有一个警告提示:

There are a plethora of colors listed at http://www.w3schools.com/HTML/html_colornames.asp. There's also a cautionary note at the bottom:


注意:上面的名称不是W3C Web标准的一部分。

Note: The names above are not a part of the W3C web standard.

W3C HTML和CSS标准仅列出了16种有效的颜色名称:
浅绿色,黑色,蓝色,紫红色,灰色,绿色,石灰,栗色,海军,橄榄色,紫色,红色,银色,蓝绿色,白色和黄色。

The W3C HTML and CSS standards have listed only 16 valid color names: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow.

如果您想要有效的HTML或CSS,请使用十六进制值。

If you want valid HTML or CSS use the HEX values instead.

这篇关于HTML / CSS中允许的颜色名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆