HTML为什么认为“ chucknorris”是一种颜色?

独自空忆成欢 提交于 2020-08-16 09:48:47

问题:

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? 这里发生了什么?


解决方案:

参考一: https://stackoom.com/question/Yu7z/HTML为什么认为-chucknorris-是一种颜色
参考二: https://oldbug.net/q/Yu7z/Why-does-HTML-think-chucknorris-is-a-color
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!