crop image to container css code example Example: how to crop images in css img{ object-fit: cover; }