另一个奇怪的问题:-) [英] An other vierd question :-)

查看:77
本文介绍了另一个奇怪的问题:-)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找一个像这样的表格单元格的页面:

< td width =" 253"高度= QUOT; 10" bgcolor =" 98a7b2">一些白色的文字< / td>


由于页面背景是白色的,我看不到
$里面的文字b $ b cell,Mozilla。但它在IE中显示。区别在于颜色

代码没有包含#符号。


因为这会影响浏览器中的渲染效果,所以我非常< b / b
表示W3C验证器没有注意到这是一个错误。或者只是Mozilla需要#颜色代码中的#符号吗?


我自己在这里进行测试,如果感兴趣的话:
http://w1.978.telia.com/ ~u97802964 / tests / test3.html


-

/ Arne

Find a page some table cells was made like this:
<td width="253" height="10" bgcolor="98a7b2">Some text in white color</td>

Since the page background was white I could''t see the text inside the
cell, with Mozilla. But in IE it shows. The difference is that the color
code don''t have the # sign included.

Since that affected the rendering different in browsers, I was very
supriced that the W3C validator don''t notice that as an error. Or is it
just Mozilla who required the # sign in the color code?

I have a test on my own here, if interested:
http://w1.978.telia.com/~u97802964/tests/test3.html

--
/Arne

推荐答案

us**@domain.inva lid写道:
查找页面的一些表格细胞是这样制成的:
< td width =" 253"高度= QUOT; 10" bgcolor =" 98a7b2">一些白色的文字< / td>

由于页面背景是白色的,我无法用Mozilla看到
单元格内的文本。但它在IE中显示。区别在于颜色
代码没有包含#符号。


IE足够宽容(一件坏事)允许无效的颜色。更好

浏览器不是。

由于这影响了浏览器中的渲染效果,我非常赞赏W3C验证器没有注意到作为一个错误。或者只是Mozilla需要颜色代码中的#符号?
Find a page some table cells was made like this:
<td width="253" height="10" bgcolor="98a7b2">Some text in white color</td>

Since the page background was white I could''t see the text inside the
cell, with Mozilla. But in IE it shows. The difference is that the color
code don''t have the # sign included.
IE is forgiving enough (a bad thing) to allow invalid colors. Better
browsers aren''t.
Since that affected the rendering different in browsers, I was very
supriced that the W3C validator don''t notice that as an error. Or is it
just Mozilla who required the # sign in the color code?




验证器只能验证DTD,它们不是很灵活。

HTML过渡DTD( http ://www.w3.org/TR/REC-html40/loose.dtd )只有

将颜色定义为CDATA,这对他们的
$ b几乎没有限制$ b content。



The validator can only validate to DTDs, which aren''t very flexible. The
HTML transitional DTD (http://www.w3.org/TR/REC-html40/loose.dtd) only
defines colors as CDATA, which puts very little restriction on their
content.


曾几何时* Leif K-Brooks *写道:
Once upon a time *Leif K-Brooks* wrote:
我们** @ domain.inva lid写道:
查找页面一些表格单元格是这样的:
< td width = QUOT; 253"高度= QUOT; 10" bgcolor =" 98a7b2">一些白色的文字< / td>

由于页面背景是白色的,我无法用Mozilla看到
单元格内的文本。但它在IE中显示。区别在于颜色
代码没有包含#符号。
Find a page some table cells was made like this:
<td width="253" height="10" bgcolor="98a7b2">Some text in white color</td>

Since the page background was white I could''t see the text inside the
cell, with Mozilla. But in IE it shows. The difference is that the color
code don''t have the # sign included.


IE非常宽容(一件坏事)允许无效的颜色。更好的浏览器不是。



IE is forgiving enough (a bad thing) to allow invalid colors. Better
browsers aren''t.

由于这影响了浏览器中的渲染效果,我非常赞赏W3C验证器没有注意到作为一个错误。或者只是Mozilla需要在颜色代码中使用#符号?
Since that affected the rendering different in browsers, I was very
supriced that the W3C validator don''t notice that as an error. Or is it
just Mozilla who required the # sign in the color code?



验证器只能验证DTD,它们不是很灵活。
HTML过渡DTD( http:// www .w3.org / TR / REC-html40 / loose.dtd )仅将颜色定义为CDATA,这对其内容的限制很少。



The validator can only validate to DTDs, which aren''t very flexible. The
HTML transitional DTD (http://www.w3.org/TR/REC-html40/loose.dtd) only
defines colors as CDATA, which puts very little restriction on their
content.




当我在测试页面上尝试严格的DTD时,我收到了

属性bgcolor的错误。我应该这样做。但那只是用#符号设置

颜色的行。没有#

的颜色设置相同的行通过。


所以看起来,验证器甚至不考虑字符串bgcolor

color =''000000''"作为代码。是因为#缺少了吗?如果是这样,那么

验证器必须具有一些值。为了标志?我很困惑,或者我是/ b $ b真的很困惑:-)


-

/ Arne



When I tried the Strict DTD on my test page, I get an error for the
attribute "bgcolor" as I should. But that was only on the line where
color was set with the # sign. The same line with color set without #
passed.

So as it seems, the validator don''t even consider the string "bgcolor
color=''000000''" as a code. Is it because # is missing? If so, then the
validator must have some "value" for the sign? Am I confused, or am I
really confused :-)

--
/Arne


2004年10月16日星期六17:32:00 GMT,< us ** @ domain.invalid>写道:
On Sat, 16 Oct 2004 17:32:00 GMT, <us**@domain.invalid> wrote:
曾几何时* Leif K-Brooks *写道:
Once upon a time *Leif K-Brooks* wrote:
验证器只能验证DTD,它们不是很灵活。
HTML过渡DTD( http:// www .w3.org / TR / REC-html40 / loose.dtd )仅将颜色定义为CDATA,这对其内容的限制很少。
The validator can only validate to DTDs, which aren''t very flexible. The
HTML transitional DTD (http://www.w3.org/TR/REC-html40/loose.dtd) only
defines colors as CDATA, which puts very little restriction on their
content.



当我在测试页面上尝试严格的DTD时,我收到了
属性bgcolor的错误。我应该这样做。但那只是在用#符号设置
颜色的行上。没有#
通过的颜色设置相同的行。



When I tried the Strict DTD on my test page, I get an error for the
attribute "bgcolor" as I should. But that was only on the line where
color was set with the # sign. The same line with color set without #
passed.




是的,因为验证器不能告诉#XXXXXX比

XXXXXX。它们都是CDATA的合法价值,而且与

验证器能够检查的一样多。但是,合规的UAs仍然不应该解释XXXXXX并且应该解释为#XXXXXX。



Yes, because the validator can''t tell #XXXXXX is any more right than
XXXXXX. They''re both legal values for CDATA, and that''s as much as the
validator is able to check. It remains, however, that compliant UAs should
not interpret XXXXXX and should interpret #XXXXXX.


这篇关于另一个奇怪的问题:-)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆