javascript 基于 Jquery 的图像马赛克墙布局

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4198095/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 10:39:49  来源:igfitidea点击:

Jquery based image mosaic wall layouts

javascriptjqueryimagelayoutcss-position

提问by scott

I'm looking to recreate the layout that's present at this site:

我希望重新创建此站点上的布局:

http://prettytasty.tumblr.com/archive/

http://prettytasty.tumblr.com/archive/

The only way to accomplish this is using absolute positioning, however it appears that they're using javascript to dynamically position each image entry on the page. Is there a jquery plugin or example that accomplishes this or something similar?

实现这一点的唯一方法是使用绝对定位,但似乎他们正在使用 javascript 来动态定位页面上的每个图像条目。是否有实现此功能或类似功能的 jquery 插件或示例?

I realize javascript is the last thing you want to have to depend on for layout, but I'm just curious and would like to see how it is accomplished.

我意识到 javascript 是您想要依赖布局的最后一件事,但我只是好奇并想看看它是如何完成的。

回答by Yi Jiang

The effect you see on that particular page is actually created with prototype.js, but for jQuery you're probably looking for the jQuery Masonry Plugin

您在该特定页面上看到的效果实际上是使用prototype.js 创建的,但是对于 jQuery,您可能正在寻找jQuery Masonry 插件