我有一个表格,我正在尝试应用背景图像,但它没有显示。图像路径正确(萤火虫说图像已加载)并且表格大小与图像大小相同(156X46px)
HTML:
<!--hazard icons start here -->
<table class="hazard-table">
<tr>
<td> 1 </td>
<td> 1 </td>
<td> 1 </td>
</tr>
<tr>
<td> 1 </td>
<td> 1 </td>
<td> 1 </td>
</tr>
<!-- hazard icons end here -->
</table>
CSS:
table.hazard-table {
background:url('../images/icon-item.png') no-repeat;
width:156px;
height:46px;
border-width: 1px;
border-spacing: 2px;
border-style: solid;
border-color:#ebebeb;
border-collapse: collapse;
background-color: white;
}
table.hazard-table th {
border-width: 1px;
padding: 1px;
border-style: inset;
border-color: #ebebeb;
background-color: white;
-moz-border-radius: ;
}
table.hazard-table td {
background-position:30 20 ;
border-width: 1px;
padding: 1px;
border-style: inset;
border-color: #ebebeb;
background-color: white;
-moz-border-radius: ;
}