Isotope folded (elements overlap)

后端 未结 3 2009
余生分开走
余生分开走 2021-01-31 23:26

I have been reading stack overflow for a solution but can\'t find it.

\"enter (full si

3条回答
  •  独厮守ぢ
    2021-02-01 00:02

    The problem is that when you run .isotope the images are not yet loaded, so the plugin cannot calculate their size..

    You have some different options to choose from

    1. Start isotope after the images have loaded.. $(window).load(function(){/*init plugin here*/})
    2. Use the imagesLoaded plugin: http://isotope.metafizzy.co/docs/help.html#imagesloaded_plugin
    3. call reLayout once the images are loaded $(window).load(function(){$('#thumbs').isotope('reLayout');});
    4. if the li elements are fixed size, then give them dimensions through CSS, and isotope will pick them up..

提交回复
热议问题