如何复制pinterest.com的绝对div堆叠布局 [英] how to replicate pinterest.com's absolute div stacking layout

查看:182
本文介绍了如何复制pinterest.com的绝对div堆叠布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要复制Pinterest.com的div布局,具体是如何调整列的数量以适应更多/更少在浏览器调整大小和垂直堆叠不依赖于相邻的列高度。源代码显示每个div是位置绝对。联合创始人回答了一个Quora的帖子说明它是用自定义jQuery和CSS完成。我想把结果从左到右排序。

I am looking to replicate Pinterest.com's div layout, specifically how the number of columns adjusts to fit more/less on browser resize and the vertical stacking is not dependent on adjacent column heights. The source code shows that each div is position absolute. A co-founder has answered a Quora post stating it is done with custom jQuery and CSS. I would like the results sorted left to right. Any direction you could provide to make it myself would be greatly appreciated.

推荐答案

您还可以检查jQuery插件< a href =http://masonry.desandro.com/> Masonry ,用于此类功能。

You could also check on the jQuery Plug-in Masonry, for this kind of functionality.

这篇关于如何复制pinterest.com的绝对div堆叠布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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