这是我正在使用的实时沙箱页面:https://www.wingsfund.com/test1.html我正在尝试堆叠图像和表格以使其看起来像这样:https://www.wingsfund.com/但为什么那些空白会垂直展开呢?我如何让所有元素堆叠并粘在一起?
<table width="1000" height="55" border="0" align="center" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="200" ><img src="http://wingsfund.com/imgs/HOME-BLUE.jpg" width="200" height="55" alt=""/></td>
<td width="200" ><a href="https://www.google.com/" target="_self"><img src="http://wingsfund.com/imgs/what-we-seek.jpg" width="200" height="55" onmouseover="this.src='http://wingsfund.com/imgs/what-we-seek-mouse.jpg'" onmouseout ="this.src='http://wingsfund.com/imgs/what-we-seek.jpg'" border="0" /></a><a href="/what-we-seek.html"></a></td>
<td width="200" ><a href="https://www.google.com/" target="_self"><img src="http://wingsfund.com/imgs/our-approach.jpg" width="200" height="55" onmouseover="this.src='http://wingsfund.com/imgs/our-approach-mouse.jpg'" onmouseout ="this.src='http://wingsfund.com/imgs/our-approach.jpg'" border="0" /></a><a href="/what-we-seek.html"></a></td>
<td width="200" ><a href="https://www.google.com/" target="_self"><img src="http://wingsfund.com/imgs/public-market.jpg" width="200" height="55" onmouseover="this.src='http://wingsfund.com/imgs/public-market-mouse.jpg'" onmouseout ="this.src='http://wingsfund.com/imgs/public-market.jpg'" border="0" /></a><a href="/what-we-seek.html"></a></td>
<td width="200" ><a href="https://www.google.com/" target="_self"><img src="http://wingsfund.com/imgs/about-us.jpg" width="200" height="55" onmouseover="this.src='http://wingsfund.com/imgs/about-us-mouse.jpg'" onmouseout ="this.src='http://wingsfund.com/imgs/about-us.jpg'" border="0" /></a><a href="/what-we-seek.html"></a></td>
</tr>
</tbody>
</table>
<center><img src="http://wingsfund.com/imgs/blue-strip.jpg" display: "block" width="1000" height="20" line-height= "0"; alt=""/></center>
<center><img src="http://wingsfund.com/imgs/banner.jpg" width="1000" height="565" line-height= "0"; alt=""/></center>
<table background="http://wingsfund.com/imgs/gray-bar.jpg" width="1000" height="92" border="0" align="center" cellpadding="0" cellspacing="0">
最佳答案
他们使用了一个 tr,然后在那个 tr 上放了一个背景,所以整个 td 都被填满了,没有显示空白。
<tr>
<td colspan="11" style="background-image:url(wp-..........>
</td>
</tr>
你所做的完全不同。 我本来要告诉你检查你的填充和边距,但它们似乎都设置为 0px。但是标签给了你那些空白,但我不知道为什么
关于html - 如何去除图像和表格之间的这些空白区域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56032680/