这是一个有 2 行的表格。第一行包含一个 hr
。第二个表行包含文本和图像。为什么 hr
不同时覆盖图像和文本?
<table>
<tr>
<td align="center">
<hr class="hr">
</td>
</tr>
<tr align="center">
<td width="60%" align="center">
<p>
Every occasion should be a special one! No matter the event, a custom-designed cake always adds that special something.
Weddings, birthdays, baby showers, an anniversary... for ANY event, large or small, let me help you celebrate with a delicious and beautifully-designed and decorated cake!
Please take a look through my Cake Photo Gallery to see some of the work I've done recently.
Anytime Cakes! Any cake, any style, any time!!
Enjoy!
...Andrea
</p>
</td>
<td width="40%" align="center">
<img src="images/homeimg.jpg">
</td>
</tr>
</table>
最佳答案
第二行有两个单元格,第一行只有一个。将 colspan="2"
添加到第一个 td
以使其成为两列宽:
<table>
<tr>
<td align="center" colspan="2">
<hr class="hr">
</td>
</tr>
<tr align="center">
<td width="60%" align="center">
<p>
Every occasion should be a special one! No matter the event, a custom-designed cake always adds that special something. Weddings, birthdays, baby showers, an anniversary... for ANY event, large or small, let me help you celebrate with a delicious and
beautifully-designed and decorated cake! Please take a look through my Cake Photo Gallery to see some of the work I've done recently. Anytime Cakes! Any cake, any style, any time!! Enjoy! ...Andrea
</p>
</td>
<td width="40%" align="center">
<img src="images/homeimg.jpg">
</td>
</tr>
</table>
关于html - hr没有覆盖图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42821511/