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
Try combining the fitToView and maxWidth API parameters, for example:
fitToView
maxWidth
$('.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
Source: https://habr.com/ru/post/943859/More articles:Geocoding API for Java - javaBootstrap: the center of any span - htmlJQuery trigger event for checkbox - jqueryUnexpected NullReferenceException in view - asp.net-mvcHow can I make fancyBox 2 adjust its height to fit its contents? - javascriptWhat are CSS3 modules? - cssHow to make Ragel EOF actions work - cTransliteration from Cyrillic to Latin ICU4j java - javaphp weird behavior, array access - arraysUnknown $ rootElementProvider: Qunit + angularjs integration - angularjsAll Articles