代码之家  ›  专栏  ›  技术社区  ›  Kareem Kamal

如何垂直堆叠图像[复制]

  •  0
  • Kareem Kamal  · 技术社区  · 8 年前

    enter image description here

    我的css

    #gallery{
        display: flex;
        -ms-flex-direction: row;
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-around;
        align-content: space-around;
        flex-wrap: nowrap;
    
    }
    #gallery img{
      max-width: 100%;
      align-self: flex-end;
      padding: 5px;
      box-sizing: border-box;
    }
    

    我尝试将flex grow和shrink添加为1,一旦我将flex wrap更改为nowrap,它们就会膨胀到最大尺寸

    http://setch.me/

    1 回复  |  直到 8 年前
        1
  •  -1
  •   Den Isahac    8 年前

    有两个Javascript库为您发挥了神奇的作用。