问题:

How come certain random strings produce colors when entered as background colors in HTML? 在HTML中作为背景色输入时,某些随机字符串如何产生颜色? For example: 例如:

<body bgcolor="chucknorris"> test </body>

...produces a document with a red background across all browsers and platforms. ...在所有浏览器和平台上产生背景红色的文档。

Interestingly, while chucknorri produces a red background as well, chucknorr produces a yellow background. 有趣的是,虽然chucknorri产生红色背景,但chucknorr产生黄色背景。

What's going on here? 这里发生了什么?


解决方案:

参考一:HTML为什么认为“ chucknorris”是一种颜色?
参考二:Why does HTML think “chucknorris” is a color?
08-31 01:18
查看更多