material design lite - Masonry layout using MDL -
i trying create dynamic tiles using mdl-grid
, mdl-cell
, cell stretching maximum height of column in row .
to see difference here example angular material design . here tiles displayed dynamically , columns not taking max width of other columns in row .
http://codepen.io/anon/pen/bpbxzz
here second example using material lite , here can see columns stretching
http://codepen.io/anon/pen/xvkaod
is there way can create dynamic tiles using mdl ?
update
after researching few hours found approach called masonry layout . searched , found below ones . can not able flex layout .
1) jquery plugin https://github.com/desandro/masonry
here link http://jsfiddle.net/rtlun/
here stackoverflow link
compact arrangement of divs in 2 directions
update
i found above links doesn't maintain order of items , 1 . can not find css code
http://michieldewit.github.io/isotope-modulo-columns/
thanks
using http://masonry.desandro.com/ , works me.
<div class="mdl-grid masonry-grid"> <div class="mdl-cell mdl-cell--4-col-desktop masonry-grid-item"> </div> <div class="mdl-cell mdl-cell--4-col-desktop masonry-grid-item"> </div> </div> <script src="https://unpkg.com/masonry- layout@4/dist/masonry.pkgd.min.js"></script> <script> var elem = document.queryselector('.masonry-grid'); var msnry = new masonry( elem, { // options itemselector: '.masonry-grid-item' }); </script>
Comments
Post a Comment