简体   繁体   English

网格中不同大小的图像

[英]Different size images in grid

I'm looking for some advice on how to approach creating a grid like the picture included.我正在寻找有关如何创建包含图片的网格的一些建议。 The images are going to be of different sizes.图像将具有不同的大小。

It will be included in a wordpress theme that when images are uploaded to the specific post type they will display where the pictures are shown.它将包含在 wordpress 主题中,当图像上传到特定的帖子类型时,它们将显示图片的显示位置。

I was leaning towards a list with different styles for &:nth-of-type() styles.对于 &:nth-of-type() styles,我倾向于使用不同的 styles 列表。

TIA for any advice, all is appreciated. TIA 提供任何建议,我们将不胜感激。

在此处输入图像描述

I would try using something like Masonry ( https://masonry.desandro.com/ ).我会尝试使用 Masonry 之类的东西( https://masonry.desandro.com/ )。 Great library, very versatile.很棒的图书馆,用途广泛。 There are also frameworks that support grids on demand and nested grids, like SusyGrid ( https://www.oddbird.net/susy/ ).还有一些框架支持按需网格和嵌套网格,例如 SusyGrid ( https://www.oddbird.net/susy/ )。 I have used this successfully in the past for asymetrical and nested grid layouts.我过去曾成功地将其用于不对称和嵌套网格布局。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM