CSS - 如何删除锚定图像之间的空白 [英] CSS - How to remove whitespace between anchored images

查看:89
本文介绍了CSS - 如何删除锚定图像之间的空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个互相重叠的锚定图像,用换行符分隔。我希望图像直接坐在彼此的顶部,但在Firefox中,图像之间存在差距。它适用于IE7。我能够解决这个问题的唯一方法是改变行高(我不想这么做)。

I have two anchored images on top of each other, separated with a line break. I want the images to sit directly on top of each other, but in Firefox there is a gap between the images. It works in IE7. The only way I have been able to fix this is by changing the line-height (which I don't want to do).

<a href="image.jpg">
    <img height="75" width="75" src="image.jpg" />
</a>
<br/>
<a href="image2.jpg">
    <img height="75" width="75" src="image2.jpg" />
</a>


推荐答案

将CSS属性垂直对齐置于顶级图像将消除Firefox中的差距。

Placing the CSS property vertical-align to bottom on the top image will remove the gap in Firefox.

这篇关于CSS - 如何删除锚定图像之间的空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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