8 months ago

CSS hack for quickly resizing images for mobile devices

Use object-fit cover on your images for a quick way to resize images without ruining proportions... @media (max-width: 540px) { img{ max-height:200px; max-width:100%; object-fit:cover; } }

Here's a demo:

Do you have any comment on this tricks? then let the author know about that. comment here