日期:2014-05-17  浏览次数:20614 次

图片撑大表格问题
<table>
  <tr>
  <td width="10" width="245" style=" background-color:Red; padding:0px; margin:0px;">
  <img src="images/shouye_026.gif" width="245" height="10" style=" border-bottom-style:none; margin:0px; padding:0px; "/>
  </td>
  </tr>
  </table>

我这里有一张图片,我要让他填充表格,然后这二个图片的大小是245*10,但是当我这样设置后,我发现,显示出来的结果并不是我想像的那样,图片并没有完全填充表格,表格中出现了红色的背景色,也就是说图片本身的大小没有变化,但是把表格中的单元格的宽度增加了

------解决方案--------------------
[code=HTML]
<table>
<tr>
<td width="245" height="10" style=" background-color:Red; padding:0px; margin:0px;">
<img src="images/shouye_026.gif" width="100%" height="100%" style=" border-bottom-style:none; margin:0px; padding:0px; "/>
</td>
</tr>
</table>
[/code
------解决方案--------------------
HTML code

<table>
  <tr>
  <td width="245" height="10" style=" background-color:Red; padding:0px; margin:0px;">
  <img src="images/shouye_026.gif" width="100%" height="100%" style=" border-bottom-style:none; margin:0px; padding:0px; "/>
  </td>
  </tr>
</table>