+ -
当前位置:首页 → 问答吧 → th覆盖tr背景图的问题。

th覆盖tr背景图的问题。

时间:2011-03-24

来源:互联网

我在tr的样式里设置了一条横向平铺的背景图,在th样式里设置了一条两像素宽的居右的背景图。其他浏览器可以显示,但在IE6下只显示th的两像背景图。tr的背景图不显示了
<style> .tb_head{ background:url(http://home.blueidea.com/attachment/201103/24/256092_1300935229e3gt.gif) repeat-x } .th_bg{ background:url(http://home.blueidea.com/attachment/201103/24/256092_1300935229rBXM.gif) no-repeat; background-position:right; text-align:center } </style> <table width="778" border="0" cellspacing="0" cellpadding="0"> <tr class="tb_head"> <th width="480" height="31" class="th_bg">文章标题</th> <th width="107" class="th_bg">来源</th> <th width="87" class="th_bg">位置</th> <th width="106" class="tCenter">日期</th> </tr> </table>
 提示:您可以先修改部分代码再运行
[ 本帖最后由 dadait 于 2011-3-24 10:57 编辑 ]

附件

th_bg_03.gif (181 Bytes)

2011-3-24 10:54

th_bg_05.gif (174 Bytes)

2011-3-24 10:54

作者: dadait   发布时间: 2011-03-24

建议你在th嵌套标签来解决!也就是th条横向平铺的背景图,th里面嵌套的标签设置了一条两像素宽的居右的背景图

作者: wyysf   发布时间: 2011-03-24

为什么不直接thead tbody解决呢 就应该不用加class了.我现在做表格一本都是不用图片的.其实都挺好看的.

作者: leilay   发布时间: 2011-03-24

试过thead tbody了。效果一样。没什么用。

作者: dadait   发布时间: 2011-03-24

看来只有在th里再套个标签了。

作者: dadait   发布时间: 2011-03-24