问题
Is there a way to get isotope to order the grid in the way that there are no gaps?
I see the elements changing places in few of the demos but can't achieve the effect myself. Like here: http://isotope.metafizzy.co/demos/layout-modes.html
Here's my fiddle: http://jsfiddle.net/crappish/zvRy5/
As you can see, when you resize the "result", the grid changes alright but at certain widths, white gaps appear in the mosaic. Which is highly unfortunate. :(
回答1:
I ended up writing my own extension (perfectMasonry) which does not leave gaps, but instead lays out perfect "brick wall". :) I'll try to publish it (GitHub, mayhaps) as soon as I get some free time to clean it up.
Edit: Here be the perfectMasonry extension: https://github.com/zonear/isotope-perfectmasonry
回答2:
If you look at this fiddle and

来源:https://stackoverflow.com/questions/11135470/how-to-get-isotope-to-avoid-gaps-with-variable-size-tiles