Isotope Overlapping Images?

后端 未结 4 896
北荒
北荒 2021-02-04 07:17

It seems like it only happens in Chrome and Safari.. not Firefox. I\'m using it with the foundation responsive framework so I\'m not sure what to do about setting the height.

4条回答
  •  旧时难觅i
    2021-02-04 07:20

    Update (original answer was wrong because the browser used cached images..)

    The issue seems to be that the images are not loaded and the calculations fail.

    If you wrap the isotop code in $(window).load(function(){ ..... }); it seems to work as expected..

    See http://jsfiddle.net/TLjay/2/


    Not sure why it happens, but a simple workaround is (since it gets fixed once you resize the window) to manually call a resize.

    so just adding $(window).resize(); at the end of your code fixes it..

    Demo at http://jsfiddle.net/TLjay/1/

提交回复
热议问题