browser - if the opacity of parent element is 0.5 - 为什么HTML认为 "chucknorris "是一种颜色?

which are restrictions active if sandbox attribute is used / html / background-color

为什么在HTML中输入某些随机字符串作为背景色时会产生颜色?比如说

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

Igor Burago



Answer #1
<table>
  <tr>
    <td bgcolor="chucknorris" cellpadding="10" width="150" align="center">chucknorris</td>
    <td bgcolor="c00c00000000" cellpadding="10" width="150" align="center">c00c00000000</td>
    <td bgcolor="c00000" cellpadding="10" width="150" align="center">c00000</td>
  </tr>
</table>