gpt4 book ai didi

html - 使用 HTML 标签将单独的图像组合成单个图像

转载 作者:行者123 更新时间:2023-11-28 02:06:17 25 4
gpt4 key购买 nike

我有 3 个部分的图像,我必须将其显示为单个图像,并且还想使用 HTML 标记包含到图像的 3 个部分的链接。

我创建了包含 1 列和 2 行的表格,并将图像插入表格的第 3 部分。但它在上下图像(第一行和第二行)之间有一些空间。如何解决这个问题并创建一个没有任何空格的图形,并且还需要包含到第三个图像的链接。

急需帮助

<table style="width: 660px; border-collapse: collapse; height: 237px;" border="0" cellspacing="0" cellpadding="0" sizset="0" sizcache="15">
<tbody sizset="0" sizcache="15">
<tr>
<td><img style="margin: 0px; border: 0px currentColor;" src="uploaded/Online_Newsletters/Nav/masthead-ball_top.jpg" width="665" height="197"></td>
</tr>
<tr>
<td><img style="margin: 0px; border: 0px currentColor;" src="uploaded/Online_Newsletters/Nav/ball_bottom_left.jpg" width="579" height="37"><img style="margin: 0px; border: 0px currentColor;" src="uploaded/Online_Newsletters/Nav/ball_bottom_right.jpg" width="86" height="37"></td>
</tr>
</tbody>
</table>

我使用了上面的代码,但图像之间仍然有空间。我公司的网站是使用 finalsite 管理的,所以我使用的是 finalsite 编辑器。

最佳答案

在表格标签中使用 cellpadding 和 cellspacing:

<table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse;">

并使用第三张图片作为链接只需使用

<a href="http://www.example.com"><img src="yourimage.jpg" border="0" style="float:left;" /></a>

编辑:

style="float:left;" 添加到您的 img 标签。

http://jsfiddle.net/H628X/1/

关于html - 使用 HTML 标签将单独的图像组合成单个图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11293760/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com