【发布时间】:2011-05-09 10:28:46
【问题描述】:
我有一个带有<thead> 和<th> 标签的<table>。
<thead> 和 <th> 标签都有背景图片。 <thead> 的背景图片重复,<th> 的背景图片位于单元格的左侧。
在 Firefox 中它可以正常工作,但在 IE(我的 IE 是版本 7)中,<thead> 的背景图像不显示。如果我删除<th> 的背景图片,则会出现<thead> 的背景图片。
有什么建议吗?
编辑: 这是我的简化代码:
<table>
<thead>
<tr>
<th>AAAA</th>
<th>BBBB</th>
<th>CCCC</th>
</tr>
</thead>
<tbody>
<tr>
<td>1111</td>
<td>1111</td>
<td>1111</td>
</tr>
</tbody>
</table>
<style>
thead {
background: url(PATH TO MY IMAGE) repeat-x center /*this image is not displayed in IE*/
}
th {
background: url(PATH TO MY IMAGE) no-repeat left center
}
</style>
【问题讨论】:
标签: html css internet-explorer background html-table