标签云

微信群

扫码加入我们

WeChat QR Code

为什么3位进制的颜色代码值在Internet Explorer中有不同的解释?

How exactly is Internet Explorer interpreting them, and under which guideline or set of standards?

For instance:

#FFF

is seem as the color white in Google Chrome, for instance, whereas in Internet Explorer (I tested it on 8 and 9) it appears as black.

I code I used to test this was as follows:

<body bgcolor="#ffffff"> vs. <body bgcolor="#fff">

(I am aware that bgcolor is deprecated, it was just convenient for what I was accomplishing at hand).

I am also aware that this is a bug, and that it can be easily fixed by appending a few digits (all-in-all 6) to the hexcode, but I am just interested in seeing the science behind why it occurs, if there is an explanation for it.


Most likely a bug specifically to do with the deprecated bgcolor, if you apply the #fff through conventional means its fine.

2018年05月24日03分31秒

Aaron Vanston: The only bug/problem/issue is a developer expecting a predictable uniform result when setting an invalid value for (HTML's) bgcolor (and then talks about CSS...)

2018年05月24日03分31秒