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.