How to create a responsive (varying column count) Angular-Material card grid

前端 未结 4 498
悲&欢浪女
悲&欢浪女 2020-12-31 03:13

I\'m trying to create a grid of Angular-Material cards that behaves somewhat like a Bootstrap grid. Ideally, cards will be full-width for small screen widths and jump to two

4条回答
  •  感动是毒
    2020-12-31 03:46

    If I understood the question right, this works like a charm:

    
      

    Plunker with multiple breakpoints : (resize the inner window, not the browser window) http://plnkr.co/edit/8QPYdzLD8qzEbdz5sesE?p=preview

    The plunker has been updated to show cards with different height.
    2 directives have been made, so the biggest height of all cards is kept in memory and this one is applied to all cards.

提交回复
热议问题