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
相關文章
相關標籤/搜索