/-6ren">
gpt4 book ai didi

javascript - 无法设置jssor slider 的高度

转载 作者:行者123 更新时间:2023-12-02 16:17:41 24 4
gpt4 key购买 nike

我用来绘制 slider 的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>

我用来显示 slider 的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);

我无法增加 slider 的高度,请帮忙......

最佳答案

您可以更改jss或 slider 的宽度和高度。

找到这些代码:

$SlideWidth: 600,
$SlideHeight: 300,

关于javascript - 无法设置jssor slider 的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29430418/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com