paint-brush
How to De-Squeeze an Image Using CSSby@niiazaly-dhumaliev
2,411 reads
2,411 reads

How to De-Squeeze an Image Using CSS

by Niiazaly Dzhumaliev1mApril 14th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

CSS has a convenient property called object-fit with cover value. It will crop the sides of an image and maintain its aspect ratio. It is eye-catching at first glance and disrupts the UI of your project. With this property, images in your project will look well sized and look well-sized. To fix the squeezing, CSS has an easy way to do it: apply "object-fit: cover" to the cover value. It is a convenient way to get rid of the squeezing.

Company Mentioned

Mention Thumbnail
featured image - How to De-Squeeze an Image Using CSS
Niiazaly Dzhumaliev HackerNoon profile picture
Niiazaly Dzhumaliev

Niiazaly Dzhumaliev

@niiazaly-dhumaliev

Software Developer

Learn More
LEARN MORE ABOUT @NIIAZALY-DHUMALIEV'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Niiazaly Dzhumaliev HackerNoon profile picture
Niiazaly Dzhumaliev@niiazaly-dhumaliev
Software Developer

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite