同位素折叠(元素重叠) [英] Isotope folded (elements overlap)

查看:101
本文介绍了同位素折叠(元素重叠)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读堆栈溢出的解决方案,但找不到它.

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

(全尺寸图片,位于 http://i.imgur.com/hrcDg.png )

当我加载页面时,它看起来像这样

When I load the page it looks like that

这是网站(测试版)

http://e-gimnazija.hostoi.com/test/site/index.html

如果您按下 all ,如果它在开始时自动展开,也许我可以解决它

If you press all it unfolds, maybe I can solve it if it auto unfolds at the start

推荐答案

问题是,当您运行.isotope时,图像尚未加载,因此插件无法计算图像的大小..

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

您有一些不同的选择

  1. 加载图像后开始同位素.$(window).load(function(){/*init plugin here*/})
  2. 使用 imagesLoaded插件 : http://isotope.metafizzy.co/docs/help.html#imagesloaded_plugin
  3. 加载图像后,
  4. 调用 reLayout li>
  5. 如果li元素的大小是固定的,则通过CSS为其指定尺寸,然后isotope会选择它们..
  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..

这篇关于同位素折叠(元素重叠)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆