GraemeFulton
7 days 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: https://twitter.com/graeme_fulton/status/1137409649857220608

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