浮动DIV填补未使用的空间 [英] Floating DIV's to fill unused space

查看:94
本文介绍了浮动DIV填补未使用的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用某个API时,我使用的功能基本上为我提供了几十种设置。为了显示这些,我选择了一个容器DIV,并按组(4x 25%宽度的表格)拆分设置,其中每个被解析的组接下来出现。



这是可以很好地处理可变数量的设置的小问题,导致很多未使用的空间被遗留下来。这是由于我把所有东西都留下了,但最长的表导致下一个表出现得更远。



CSS是否支持允许将这些表浮动到未使用的空间?我突出强调了截图中最大的表格。

解决方案

查看 http://masonry.desandro.com/

我在当前的项目中使用它是很好的。我目前在下拉菜单中找到Bootstrap和浮动元素的一些问题。尽管没有什么会导致我删除插件。


When working with a certain API, I am using a function that basically provides me with dozens of categories of settings. To display these, I opted to have a container DIV and split the settings by group (4x 25% width tables) where each group that is parsed appears next.

This is working fine with the small issue of variable amounts of settings, resulting in a lot of unused space being left over. This is caused by me floating everything left, but the longest table causes the next table to appear much further down.

Does CSS support anything that would permit floating these tables into the unused space? I highlighted the largest table on the screenshot for emphasis.

解决方案

Check out http://masonry.desandro.com/

Im using it for a current project it is good. I am currently finding a few issues with Bootstrap and floating elements within a dropdown. Though nothing that will cause me to drop the plugin.

这篇关于浮动DIV填补未使用的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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