如何无间隙地显示图像 [英] how to display images without gap

查看:77
本文介绍了如何无间隙地显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我无法将图像显示在彼此旁边而没有间隙。


这是我的代码:

[html]

< table width = 600 hight = 800>

< tr>

< td>

< a href =" Images / bg2.gif"目标= QUOT; _blank"> < img src = Images / pic2.jpg>< / a>


< a href =" Images / bg2.gif"目标= QUOT; _blank"> < img src = Images / pic2.jpg>< / a>


< a href =" Images / bg2.gif"目标= QUOT; _blank"> < img src = Images / pic2.jpg>< / a>

< / td>< / tr>

< / table>

[/ html]

但是在输出中,图像之间有空格。有没有办法让它们没有任何空间。 thx

Hi!
im unable to make the images displayed beside each other wihtout gaps.

this is my code:
[html]
<table width=600 hight=800>
<tr>
<td>
<a href="Images/bg2.gif" target="_blank"> <img src=Images/pic2.jpg></a>

<a href="Images/bg2.gif" target="_blank"> <img src=Images/pic2.jpg></a>

<a href="Images/bg2.gif" target="_blank"> <img src=Images/pic2.jpg></a>
</td></tr>
</table>
[/html]
but in the output the images have space inbetween. is there a way to put them without any space . thx

推荐答案

这是因为图像总是内联的,就像文本一样,并创建''内联框''。所以你必须简单地将div的属性更改为''display:block''。唯一的问题是块级元素占据页面的整个宽度,因此''float:left''将它们保持在同一行。
This happens because images are always inline, just like text, and create ''inline boxes''. So you have to simply change the property of the div to ''display:block''. The only problem is that block level elements occupy the full width of the page so ''float:left'' will keep them on the same line.



这是因为图像总是内联的,就像文本一样,并创建''内联框''。所以你必须简单地将div的属性更改为''display:block''。唯一的问题是块级元素占据页面的整个宽度,因此''float:left''将使它们保持在同一条线上。
This happens because images are always inline, just like text, and create ''inline boxes''. So you have to simply change the property of the div to ''display:block''. The only problem is that block level elements occupy the full width of the page so ''float:left'' will keep them on the same line.



thx求助。它适用于顶部和底部图像,但水平图像上的图像仍然有gabs。我不知道如何解决这个问题。


thx for ur help. it works for the top and bottom images, but the image on the horizontal level still have gabs. i don know how to resolve this.


好吧,它不应该发布链接或你的标记。
Well, it shouldn''t, so post a link or your markup.


这篇关于如何无间隙地显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆