HTML为何认为“ chucknorris”是一种颜色? - Why does HTML think “chucknorris” is a color?

问题:

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

<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产生黄色背景。 dom

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


解决方案:

参考一: https://stackoom.com/question/Yu7z/HTML为何认为-chucknorris-是一种颜色
参考二: https://oldbug.net/q/Yu7z/Why-does-HTML-think-chucknorris-is-a-color
相关文章
相关标签/搜索