There is a fixed container, it must be a picture. There are two possible outcomes.
1. If the picture is narrower than the width of the container, then tie the picture to the full width of the container, and the top and bottom of the picture cropped.
2.If the size of the image larger than the width of the container we cut the left and right part of the image.
I added two pictures with different sizes and made is needed, but I did only dopolnitelnym class.
I need size and the right action is automatically applied. Can this be done with CSS without using js? If it is done with js, something like the right thing to do?