jquery-focuspoint
Version:
jQuery plugin for 'responsive cropping'. Dynamically crop images to fill available space without cutting out the image's subject. Great for full-screen images.
17 lines • 406 B
CSS
/* !FOCUSED IMAGES */
/*-----------------------------------------*/
.focuspoint {
position: relative; /*Any position but static should work*/
overflow: hidden;
}
.focuspoint img {
position: absolute;
left: 0;
top: 0;
margin: 0;
display: block;
/* fill and maintain aspect ratio */
width: auto; height: auto;
min-width: 100%; min-height: 100%;
max-height: none; max-width: none;
}