出现垂直间隙 - jQuery Masonry - (无缝照片网格) [英] Vertical Gaps Appearing - jQuery Masonry - (seamless photo grid)
本文介绍了出现垂直间隙 - jQuery Masonry - (无缝照片网格)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这个问题已经在不同情况中提出。
This question has already been asked in a different situation.
我试图用jQuery Masonry实现无缝照片网格。
I am trying to achieve a seamless photo grid with jQuery Masonry.
查看我的小提琴:
http://jsfiddle.net/drw158/sAkjv/
存在垂直差距。 为什么?
推荐答案
将图片显示为块级元素:
Display your images as block-level elements:
.ct-coll-item img {
display: block;
}
看看是否有效: http://jsfiddle.net/drw158/sAkjv/1/
至于为什么,我不知道。我的猜测是因为图像是内联元素,但这不是一个直接的解释。
As for the why, I have no idea. My guess would be because the images are inline elements, but that isn't a direct explanation.
这篇关于出现垂直间隙 - jQuery Masonry - (无缝照片网格)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文