CSS / JS:不同高度的浮动块元素? [英] CSS/JS: Floating block elements of differing heights?

查看:149
本文介绍了CSS / JS:不同高度的浮动块元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我正在使用的工具

正如你所看到的,我有很多块元素,我想要进入五列。

As you can see, I’ve got a lot of block elements, that I want to get into five columns.

然而,由于它们的高度不同,它们对浮动的响应不佳。 (因此页面中间的巨大的孔。)

However, since they’re of differing height, they don’t respond well to being floated. (Hence the huge hole in the middle of the page.)

我知道我见过一个JS解决方法,计算高度,并把元素放在他们适合,但我不能为我的生活找到它现在 - 任何人记住它,或有任何其他想法? ;)

I know I’ve seen a JS workaround, that calculated the heights and put the elements where they’d fit, but I can’t for the life of me find it now — anyone remember it, or have any other ideas? ;)

推荐答案

也许你想要的是:
http://desandro.com/resources/jquery-masonry/

可配置。

这篇关于CSS / JS:不同高度的浮动块元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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