Zurb Foundation Orbit Slider: crop image to fit window

I use the base and I want to use the orbit as a full width slide show. I need it to cover the whole window, width and height.

Apparently, using this slider by default is just to adjust the width of the images in the container, but I need it to fit the height, cropping the image if necessary, in order to maintain the ratio. Is there an easy way to do this?

+4
source share
1 answer

You tried to set the minimum height on the container and overflow: hidden; crop image to exact height?

The height of your image must be equal to or greater than your minimum height.

<div style="height:200px; overflow:hidden"> <img src="image" style="width:100%" alt="always use alts" /> </div> 
+2
source

Source: https://habr.com/ru/post/1485442/


All Articles