< TD style =" background:transparent">忽略< TR style =" background:silver">在过渡和严格的模式 [英] <TD style="background:transparent"> ignores <TR style="background:silver"> in transitional and strict mode

查看:133
本文介绍了< TD style =" background:transparent">忽略< TR style =" background:silver">在过渡和严格的模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果TD具有透明背景,则使用TABLE背景颜色渲染,而不是TR背景颜色。但 http://www.w3.org/TR/REC-CSS2/tables.html#table-layers 描述了浏览器应如何显示表格和表格元素。

If TD has transparent background it renders with TABLE background color, not TR background color. But http://www.w3.org/TR/REC-CSS2/tables.html#table-layers describes how browser should display table and table elements.

示例:


<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN" " http://www.w3.org/TR/html4/strict.dtd ">
< html>

< head>
< title>示例< / title>
< style>
table,tr,td {
background:transparent;
color:#000;
}
table {
width:100%;
}
< / style>
< / head>

< body style =" text-align:中央; background:silver">
< table style =" width:40em;背景:灰色>>
< tr>< th> 1< th> 2< th> 3< / tr>
< tr style =" background:green">< td> 4℃; TD> 5'; TD→6< / TR>结果< TR>< TD&大于7< TD> 8 LT; TD> 9< / TR>结果< /表>结果,< / body>

< / html>

推荐答案


IE 7.0甚至还没有CSS1 complient,所以我不希望有很多CSS 2.0选项工作。您是否想看看MS DOM中是否列出了该CSS属性?


MS CSS DOM Doc
http://msdn.microsoft.com/library/ default.asp?url = / workshop / author / css / css_node_entry.asp


更糟糕的是IE7似乎已经失去了设置层透明度的能力。我有时可以让它在当地工作但从未投入生产。


IE 7.0 is not even CSS1 complient yet, so I would not expect that many CSS 2.0 options to work.  Have you looked to see if that CSS attribute is listed in the MS DOM? 


MS CSS DOM Doc
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/css/css_node_entry.asp


To make matters worse IE7 seems to have lost the ablility to set layer transparency at all any more.  I can some times get it to work locallly but never in production.


这篇关于&lt; TD style =&quot; background:transparent&quot;&gt;忽略&lt; TR style =&quot; background:silver&quot;&gt;在过渡和严格的模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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