如何将多尺寸盒放在没有空格的容器中? [英] How to put multisize boxes in a container without blank space?

查看:99
本文介绍了如何将多尺寸盒放在没有空格的容器中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人知道如何在多个大容器中放置多个div(box),以便只在容器底部留空格?

Does anyone know how to put multiple div (box) with multiple size in the big container to let blank space only in the bottom of the container ?

我想要的代表:

这里是我有的:

谢谢!

推荐答案

听起来你想要将多种不同尺寸的容器装入一个已知尺寸的容器中,以获得最佳的适应性。 JQuery masonry是完美的,如果你愿意使用jQuery,虽然不能保证它会留下底部的所有空白。

It sounds like you're trying to fit multiple containers of various sizes into a single container with a known size to get the best fit you can. JQuery masonry is perfect for that, if you're willing to use jQuery, though there is no guarantee that it would leave all of the blank space at the bottom.

此处的文档: http://masonry.desandro.com/

在此演示: http://masonry.desandro.com/demos/basic-single-column.html

您可以将gutterWidth设置为0输出列之间的所有空间。 http://masonry.desandro.com/docs/options.html

And you can set gutterWidth to 0 to take out all space between columns. http://masonry.desandro.com/docs/options.html

这篇关于如何将多尺寸盒放在没有空格的容器中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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