【问题标题】:jquery Isotope how to fix container height to 100% with overflow: autojquery Isotope 如何通过溢出将容器高度固定为 100%:自动
【发布时间】:2014-01-10 23:01:41
【问题描述】:

在 Isotope 2.0 中,我希望元素容器能够通过溢出固定 100% 高度:自动,但是,当布局完成时,它会不断将容器的高度更改为绝对像素(因此容器中没有滚动)。

Isotope 2.0 中不再有“resizesContainer : false”。

这是我目前所拥有的:

$(document).ready(function(){
    var $container = $('#content');

    $container.imagesLoaded(function() {
        $container.isotope({
            filter : '*',
            layoutMode : 'masonry',
            // itemSelector: ".boxportfolio3",
            resizesContainer : false,
            containerStyle : {
                overflow : 'auto',
            },
            animationOptions : {
                duration : 750,
                easing : 'linear',
                queue : false,
            }
        });

        $container.isotope('on', 'layoutComplete', function(a,b) {
            console.log("this is not executed. why?? ");
            $(".isotope").css("height", "100%");
        });



    });
});

【问题讨论】:

    标签: jquery jquery-plugins jquery-isotope


    【解决方案1】:

    原来“!important”标签解决了这个问题:

    .isotope {
        height: 100% !important;
    }
    

    【讨论】:

      猜你喜欢
      • 2011-06-22
      • 2012-02-04
      • 2013-10-05
      • 2014-02-06
      • 1970-01-01
      • 1970-01-01
      • 2019-07-17
      • 1970-01-01
      • 2020-12-23
      相关资源
      最近更新 更多