资 源 简 介
The aim is to solve the common problem how to fit rectangle into square
This plugin accepts a mode parameter "pan" or "fit"
"fit" - fits the image inside the container in a way that alway full image is visible
"pan" - scale image to show the biggest possible area
Usage:
$(selector).imageFit("fit");or$(selector).imageFit("pan");
Demo page:
demo