相关疑难解决方法(0)

调整galleria的脚本

我想调整整个galleria div的大小,并调整使用galleria脚本动态生成的所有图像.

到目前为止我有

    $(window).resize(function() {
    var h = $(window).height();
    var galleriaHeight = h-54;
    var w = $(".content").width();
    var galleriaWidth = w-18;

    $("#galleria").height(galleriaHeight);
    $("#galleria").width(w);


    $(".galleria-stage").height(galleriaHeight);
    $(".galleria-stage").width(galleriaWidth);

    $(".galleria-images .galleria-image img").css({"max-height":"auto"});
    $(".galleria-images .galleria-image img").css({"max-width":galleriaWidth-36});

    $(".galleria-stage").height(galleriaHeight);
    $(".galleria-stage").width(galleriaWidth);

    $(".galleria-container").width(w);
    $(".galleria-container").height(galleriaHeight);

    $(".caption").width(w);
    $(".counter-nav").width(w);

    var sidebarHeight =h-54;
    var contentHeight =h-36;

    $(".sidebar1").height(sidebarHeight);
    $(".content").height(contentHeight);




});
Run Code Online (Sandbox Code Playgroud)

但是一切都在不均衡地扩展并且非常混乱.看完全屏代码后,我还补充道

this.bind(Galleria.RESCALE, function() {
 POS = this.getStageHeight() - tab.height() - 2;
 thumbs.css('top', OPEN ? POS - list.outerHeight() + 2 : POS);
 var img = this.getActiveImage();
 if (img) 
     {
     fixCaption(img);
     }
});
Run Code Online (Sandbox Code Playgroud)

但这也不起作用......

我想我想在我调整大小后重新加载页面...或者相对于彼此调整所有元素的大小,或者使用Galleria调整大小脚本......

有任何想法吗?

jquery galleria

2
推荐指数
1
解决办法
9341
查看次数

标签 统计

galleria ×1

jquery ×1