如何制作流体浮动:左侧布局?
例如,我想让一个盒子网格全部向左浮动。我这里有设计: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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看一下 jQuery masonry 插件,它在处理框中的内容方面提供了很大的灵活性。
Have a look at the jQuery masonry plugin which provides for a lot of flexibility in handling content in boxes.