Jquery 如何使用lightSlider设置缩略图的宽度和高度

Jquery 如何使用lightSlider设置缩略图的宽度和高度,jquery,Jquery,我想在URL上的lightslider中设置缩略图的高度和宽度: 以下是我目前的代码: $('#imageGallery').lightSlider({ gallery:true, item:1, loop:true, thumbItem:9, slideMargin:0, enableDrag: false, currentPagerPosition:'left',

我想在URL上的lightslider中设置缩略图的高度和宽度:

以下是我目前的代码:

$('#imageGallery').lightSlider({
        gallery:true,
        item:1,
        loop:true,
        thumbItem:9,

        slideMargin:0,
        enableDrag: false,
        currentPagerPosition:'left',
        onSliderLoad: function(el) {
            el.lightGallery({

                selector: '#imageGallery .lslide'
            });

        }   
    });  

请帮助我如何设置出现在“大图像”下的缩略图的高度和宽度?

LightSlider有一个设置宽度和高度缩略图的选项,名为和。如果这些不是您需要的,那么您可以使用
jquery

$(".lSGallery li").css("width", 100 + "px").css("height", 100 + "px")

LightSlider有一个选项来设置宽度和高度缩略图,称为和。如果这些不是您需要的,那么您可以使用
jquery

$(".lSGallery li").css("width", 100 + "px").css("height", 100 + "px")

verticalHeight和vThumbWidth在垂直属性设置为true时起作用,在我的例子中,它为false,因此这两个属性适用于宽度和高度。此外,我还尝试了Jquery选项($(“.lSGallery li”).css(“width”,100+“px”).css(“height”,100+“px”))以及css选项(ul.lSGallery li img{max height:50px;max width:100px;})。他们俩都不工作

verticalHeight和vThumbWidth在垂直属性设置为true时起作用,在我的例子中,它为false,因此这两个属性适用于宽度和高度。此外,我还尝试了Jquery选项($(“.lSGallery li”).css(“width”,100+“px”).css(“height”,100+“px”))以及css选项(ul.lSGallery li img{max height:50px;max width:100px;})。他们俩都不工作

简单:在
lightslider.css
中查找
.lSSlideOuter.lSPager.lSGallery img{}

它可能在img下的第140行,只需设置高度50px和<代码>宽度:100%


就这样!!它将在lightslider中设置缩略图的大小,无论图像的纵横比如何

简单:在
lightslider.css
中查找
.lSSlideOuter.lSPager.lSGallery img{}

它可能在img下的第140行,只需设置高度50px和<代码>宽度:100%


就这样!!它将在lightslider中设置缩略图的大小,无论图像的纵横比如何

如果你想增加宽度,你必须减少thumbItem值,b/c插件根据thumbItem计数设置宽度。

如果你想增加宽度,你必须减少thumbItem值,b/c插件根据thumbItem计数设置宽度。

就像Aniket Nagapure一样,您无需更改
lightslider.css
,但如果不希望图像变形,请在
lightslider.css
中查找
.lsslideout.lSPager.lSGallery li{}
并添加
高度:50px.lsslideout.lSPager.lSGallery img{}
中添加
宽度:100%
溢出:隐藏

像Aniket Nagapure一样,您不必更改
lightslider.css
,但如果您不希望图像变形,请在
lightslider.css
中查找
.lSSlideOuter.lSPager.lSGallery li{}
并添加
高度:50px.lsslideout.lSPager.lSGallery img{}
中添加
宽度:100%
溢出:隐藏

您可以使用此css并控制它“ul.lSGallery li img{max height:50px;max width:100px;}”这也不工作尝试此ul.lSGallery li img{height:50px!重要;}您可以使用此css并控制它“ul.lSGallery li img{max height:50px;max width:100px;}”这也不工作尝试此ul.lSGallery li img{height:50px!important;}verticalHeight和vThumbWidth在我们将垂直属性设置为true时起作用,在我的例子中,它是false,因此这两个属性适用于宽度和高度。此外,我尝试了Jquery选项($(.lSGallery li”).css(“width”,100+“px”).css(“height”,100+“px”))以及css选项(ul.lSGallery li img){max height:50px;max width:100px;})。当垂直属性设置为true时,verticalHeight和vThumbWidth都不起作用。在我的例子中,它是false,因此这两个属性适用于宽度和高度。此外,我尝试了Jquery选项($(“.lSGallery li”).css(“width”,100+“px”).css(“height”,100+“px”))以及CSS选项(ul.lSGallery li img{max height:50px;max width:100px;})。它们都不起作用。