【问题标题】:Bootstrap Masonry is not detect the correct heightBootstrap Masonry 未检测到正确的高度
【发布时间】:2016-08-28 09:10:59
【问题描述】:

我正在为我的网站使用 masonry 插件,

但不幸的是,当您进入页面并且页面加载时,它不会计算出页面所需的正确高度,

并且需要刷新。 我该如何解决?

http://halomli.co.il/index.php?page=gallery&galleryId=3

【问题讨论】:

    标签: twitter-bootstrap-3 jquery-masonry


    【解决方案1】:

    我知道是什么问题, 我将高度添加到图像并修复它。

    $("div.post-box").each(function(){
        $(this).find("img").height($(this).height()); 
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-08-26
      • 1970-01-01
      • 2021-06-18
      • 1970-01-01
      • 2022-01-07
      • 2021-04-08
      • 2014-11-18
      相关资源
      最近更新 更多