问题描述
有没有办法让同位素以没有间隙的方式对网格进行排序?
我看到元素在少数演示中改变了位置但是我自己无法达到效果。像这里: 这是我的小提琴:
正如您所看到的,当您调整结果的大小时,网格会改变,但在某些宽度处,马赛克中会出现白色间隙。这是非常不幸的。 :(
我最终编写了自己的扩展(perfectMasonry),它没有留下空白,而是展示了完美的砖块墙壁。:)我会尽快发布它(GitHub,mayhaps),我会有空闲时间来清理它。
编辑:这是perfectMasonry扩展:
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. :(
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
这篇关于如何获得同位素以避免可变尺寸瓷砖的间隙的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!