Javascript 具有动态大小图像的马赛克网格画廊

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10930783/
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-08-24 03:36:59  来源:igfitidea点击:

Mosaic Grid gallery with dynamic sized images

javascriptjquerygridgallerymosaic

提问by Dogoku

I have just received the following design for a project, for an image grid gallery, with dynamic width & height images (user submitted images). (Screenshot at the end of post)

我刚刚收到了一个项目的以下设计,用于图像网格画廊,具有动态宽度和高度图像(用户提交的图像)。(文末截图)

I have tried jQuery Masonry, Tympanus Automatic Image Montageand CSS-Tricks Seemless Responsive Photo Grid, but each has their limitation.

我尝试过jQuery MasonryTympanus Automatic Image MontageCSS-Tricks Seemless Responsive Photo Grid,但每个都有其局限性。

  • Jquery Masonry allows for both width and height to be dynamic, however there are gaps generated
  • The latter 2 scripts, generate very nice grids, but with the problem that either width or height must be static
  • Jquery Masonry 允许宽度和高度都是动态的,但是会产生间隙
  • 后两个脚本生成非常好的网格,但存在宽度或高度必须是静态的问题

EDIT:i came across, Isotope, which is almost perfect and i will probably end up using it, unless there's something that fixes my needs exactly. Therefore my question still remains the same...

编辑:我遇到了Isotope,它几乎是完美的,我可能最终会使用它,除非有一些东西可以完全满足我的需求。因此我的问题仍然是一样的......

Is there any javascript (preferably jQuery) script that can generate a completely dynamic mosaic (in respect to image size), like the one in the screenshot below?

是否有任何 javascript(最好是 jQuery)脚本可以生成完全动态的马赛克(关于图像大小),如下面的屏幕截图所示?

Thanks for any help

谢谢你的帮助



Gallery

画廊

采纳答案by Oleg

I suggest Freewall. It is a cross-browser and responsive jQuery plugin to help you create many types of grid layouts: flexible layouts, images layouts, nested grid layouts, metro style layouts, pinterest like layouts ... with nice CSS3 animation effects and call back events. Freewall is all-in-one solution for creating dynamic grid layouts for desktop, mobile, and tablet.

我建议Freewall。它是一个跨浏览器和响应式的 jQuery 插件,可帮助您创建多种类型的网格布局:灵活布局、图像布局、嵌套网格布局、metro 样式布局、类似 pinterest 的布局……具有漂亮的 CSS3 动画效果和回调事件。Freewall 是为桌面、移动设备和平板电脑创建动态网格布局的多合一解决方案。

Home page and document: also found here.

主页和文档:也找到了here

回答by askhat

I think you can try "Google Grid Gallery", it based on aforementioned Masonry with some additions, like styles and viewer.

我认为您可以尝试“Google Grid Gallery”,它基于上述 Masonry 并添加了一些附加功能,例如样式和查看器。