Jssor:当页面太长时添加垂直滚动条

Jssor: add vertical scrollbar when page is to long

我找到了这篇文章,但没有有价值的答案 (jssor slider thumbnail scrollbar) 基本上,如果内容比页面长,我希望能够有一个垂直滚动条。 我认为添加 "overflow-y : scroll;" 是明智的,但页面似乎在内容容器的末尾后面经过。 因此,解决方案是(理想的)内容容器在检测到页面长于容器时自动添加垂直滚动条,或者我可以将 "overflow-y : scroll;" 添加到容器中的 div?

有人提供可行的解决方案吗? 如示例中所示,这将不起作用,因为我不想仅垂直进入下一页水平

期待回复! )

var options = {

    $AutoPlay: true,                                   //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
    $DragOrientation: 1                                //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
};

var jssor_slider1 = new $JssorSlider$("slider1_container", options);

jssor_slider1.$On($JssorSlider$.$EVT_POSITION_CHANGE, function (position, fromPosition) {
    //it fires while sliding
});

jssor_slider1.$On($JssorSlider$.$EVT_PARK, function (slideIndex, fromIndex) {
    //it fires when current slide swith to another
});