背景颜色 [英] backgroundColor
问题描述
如果我将标签的backgroundColor更改为''red'',
它在ie和mozilla中都有效。
如果我改变了标签的backgroundColor to''redd'',
i得到''无效的属性值'',而且mozilla没有错误。
go figure。
>
if i change the backgroundColor of a tag to ''red'',
it works in both ie and mozilla.
if i change the backgroundColor of a tag to ''redd'',
i get ''invalid property value'' in ie, and no error in mozilla.
go figure.
推荐答案
cosmic foo写道:
cosmic foo wrote:
如果我将标签的backgroundColor更改为''red'',
它在ie和mozilla都可以工作。
如果我将标签的backgroundColor更改为''redd'',
我会在ie中获得''无效属性值',并且在mozilla中没有错误。 /> go figure。
if i change the backgroundColor of a tag to ''red'',
it works in both ie and mozilla.
if i change the backgroundColor of a tag to ''redd'',
i get ''invalid property value'' in ie, and no error in mozilla.
go figure.
如果我将background-color设置为foobar,它既不适用于
浏览器!更奇怪的是:改变foobar eggog没有
帮助!?
If I set background-color to "foobar", it doesn''t work in neither
browser!. Even more strange: changing "foobar" to "eggog" doesn''t
help!?
cosmic foo写道:
cosmic foo wrote:
如果我改变了backgroundColor的标签为''red'',
它适用于ie和mozilla。
如果我将标签的backgroundColor更改为''redd'',
我得到''在ie中无效的属性值'',并且在mozilla中没有错误
。 go figure。
if i change the backgroundColor of a tag to ''red'',
it works in both ie and mozilla.
if i change the backgroundColor of a tag to ''redd'',
i get ''invalid property value'' in ie, and no error
in mozilla. go figure.
CSS规范要求忽略未知/无法识别的属性和
值。这通常是一个好主意,因为它允许添加更新的
功能,并且不会导致旧实现出现问题。
IE出错而不是抱怨而不是忽略了,但这对于IE处理CSS的问题几乎没有什么意外。
理查德。
The CSS specification requires that unknown/unrecognised properties and
value be ignored. This is generally a good idea as it allows newer
features to be added and not cause problems for older implementations.
IE is in error for complaining instead of ignoring, but that is hardly a
surprise where IE''s handling of CSS is concerned.
Richard.
< br>
cosmic foo写道:
cosmic foo wrote:
如果我将标签的backgroundColor更改为''red'',
它在ie和mozilla中都有效。
if我将标签的backgroundColor更改为''redd'',
我在ie中获得''无效属性值',并且在mozilla中没有错误。
go figure。
if i change the backgroundColor of a tag to ''red'',
it works in both ie and mozilla.
if i change the backgroundColor of a tag to ''redd'',
i get ''invalid property value'' in ie, and no error in mozilla.
go figure.
如果你写的话
< p style =" backgroundColor =''red''">
insteed
< p style =" backgroundColor:''red''">
IE将会这样做
和Mozilla no
:-)
-
Steph an Moriaux et son [moins] vieux Mac
and if you write
<p style="backgroundColor=''red''">
insteed of
<p style="backgroundColor:''red''">
IE will do it
and Mozilla no
:-)
--
Stephane Moriaux et son [moins] vieux Mac
这篇关于背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!