简体   繁体   English

无法设置jssor滑块的高度

[英]unable to set height of jssor slider

jsp code i use to draw slider is ... 我用来绘制滑块的jsp代码是...

<div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 600px; height: 300px;">
<!-- Slides Container -->
  <div u="slides" style="cursor: move; position: absolute; overflow: hidden; left: 0px; top: 0px; width: 600px; height: 300px;">
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner01.png" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner02.jpg" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner03.jpg" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner04.png" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner05.jpg" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner06.jpg" /></div>
                <div><img u="image" src="<%=request.getContextPath()%>/images/sliderimages/banner07.jpg" /></div>
            </div>
        </div>

jquery function i use to display slider is 我用来显示滑块的jQuery函数是

 function ScaleSlider() {
    var parentWidth = $('#slider1_container').parent().width();
    console.log("**********"+parentWidth);
    if (parentWidth) {
        jssor_slider1.$ScaleWidth(parentWidth);
    }

    else
        $JssorUtils$.$Delay(ScaleSlider, 30);
}

ScaleSlider();
$(window).bind("load", ScaleSlider);
$(window).bind("resize", ScaleSlider);
$(window).bind("orientationchange", ScaleSlider);

i unable to increase the height of the slider please help.... 我无法增加滑块的高度,请帮助....

You can change the width and the height of jssor slider. 您可以更改jssor滑块的宽度和高度。

Locate these codes: 找到以下代码:

$SlideWidth: 600,
$SlideHeight: 300,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM