砌体式网格布局

时间:2020-07-29 14:18:06

标签: css grid grid-layout

我正在尝试将带有图像的div放在网格中,并确保在垂直和水平方向上均具有50px的边距。我是通过下面的代码实现的,您可以在网站上看到效果,但是问题是图像现在按列排序。实现它的最佳方法是将图像保持在行中,但垂直边距仍设置为50px?我将不胜感激。谢谢。 http://art19.kodo.house/artists/chloe-le-drezen/

&__thumbnails {
  display: block;
  -webkit-column-count: 6;
  -webkit-column-gap:   50px;
  -moz-column-count:    6;
  -moz-column-gap:      50px;
  column-count:         6;
  column-gap:           50px;

   a {
     display: block;
     margin-bottom: 50px;
     width: 100% !important;
     height: auto !important;
   }
}

0 个答案:

没有答案
相关问题