如何制作流体浮动:左侧布局?

发布于 2024-09-24 18:19:31 字数 364 浏览 0 评论 0原文

例如,我想让一个盒子网格全部向左浮动。我这里有设计:atbskate.com/trusktr。

我网站上的框都是 float:left。然而,当我通过向其中添加内容(ajax)来扩展一个框时,它会移动其他框并留下一个丑陋的空白空间。我希望用盒子来填补这个空缺。

这个想法类似于 http://www.robclarke.com/。当您单击一个框时,它会展开,并且所有其他框都会移动并且没有空白区域。如何避免这个空白区域?

robclarke.com 上的代码非常复杂,所以我没有时间剖析它......

有什么想法吗?

For example, i'd like to have a grid of boxes all floating left. I have the design here: atbskate.com/trusktr.

The boxes on my site are all float:left. However, when i expand a box by adding content into it (ajax) it shifts the other boxes and leaves an ugly empty space. I'd like for the boxes to fill up this empty space.

The idea would be similar to http://www.robclarke.com/. when you click on a box, it expans, and all the other boxes are shifted and there is no empty space. How can I avoid this empty space?

The code on robclarke.com is very complex so i ahven't had time to disect it...

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不回头走下去 2024-10-01 18:19:31

看一下 jQuery masonry 插件,它在处理框中的内容方面提供了很大的灵活性。

Have a look at the jQuery masonry plugin which provides for a lot of flexibility in handling content in boxes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文