Can Fancybox only respond horizontally to high content?

I have a site with very high images. I would like these images to react in a reactive way horizontally, but not vertically. If they match the height of the browser, they become too small to be able to see them correctly.

Is there an easy way to do this that I am missing?

See the example below. Click the second “bswift” snapshot, then a small gray square to launch Fancybox. http://www.eaaronrossdesign.com/index2.php

0
source share
1 answer

Try combining the fitToView and maxWidth API parameters, for example:

 $('.thumbs_small').fancybox({ openEffect: 'elastic', closeEffect: 'elastic', prevEffect: 'fade', nextEffect: 'fade', fitToView: false, // images won't be scaled to fit to browser height maxWidth: "90%" // images won't exceed the browser width }); 

Check JSFIDDLE

+13
source

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


All Articles