出现垂直间隙 - jQuery Masonry -(无缝照片网格) [英] Vertical Gaps Appearing - jQuery Masonry - (seamless photo grid)

查看:17
本文介绍了出现垂直间隙 - jQuery Masonry -(无缝照片网格)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题已在不同情况中提出.

我正在尝试使用 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屋!

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