tiles

How to Create Grid/Tile View?

岁酱吖の 提交于 2019-11-25 21:35:24
问题 For example, I have some class .article, and I want to view this class as grid view. So I applied this style: .article{ width:100px; height:100px; background:#333; float:left; margin:5px; } That style will make the .article look tiled/grid. It\'s work fine with fixed height. But if I want to set the height to auto (automatically stretch according to the data within it), the grid look nasty. And I want to make the view like this: 回答1: This type of layout is called Masonry layout . Masonry is