Adjusting jssor slider size

603 views Asked by At

I need to adjust the width and height to the width and height of my div which is width:250px height 170:px. I am using jssor slider and it keep giving me a full stretched width img Please kindly help me with this. this is the code below.

jssor_slider1_starter('slider1_container');
1

There are 1 answers

0
jssor On

Please use $FillMode option.

var options = {
   ...
   $FillMode: 2,  //[Optional] The way to fill image in slide, 0 stretch, 1 contain (keep aspect ratio and put all inside slide), 2 cover (keep aspect ratio and cover whole slide), 4 actual size, 5 contain for large image, actual size for small image, default value is 0
   ...
};

Reference: http://www.jssor.com/development/reference-options.html