1

The bgcolor tag takes different words and changes the color.

What actually happens? Does it take the ASCII values?

<html>
    <head>
        <title> Background Color </title>
    </head>

    <body bgcolor="Daniel">
    </body>
</html>

When I assign random words to the bgcolor tag, it applies some kinda color. How does it work?

4

1 回答 1

3

通过截取您的代码呈现的页面的屏幕截图,并在 Photoshop 中选择呈现的粉红色,您可以看到它是#da00e0.

DAniEl,只保留AF和0-9,其他归零。

我很确定如果你使用bgcolor="Cyrille"你会得到纯红色(#C00000)。

(编辑:实际上,Cyrille给出#c000e0

顺便说一句,你甚至不应该使用这个bgColor属性。CSS 出现在这里是有原因的!

于 2013-05-19T15:25:21.823 回答