How To Crop/resize An Image To Change The Aspect Ratio Using Css
I have images of size 700px(width) x 333px(height) which have aspect ratio 2.10. I Want to display these images in a grid.The size of each element in the grid is 327px(width)and 18
Solution 1:
Simply use it as a background image and resize it as you need :
div {
width:327px;
height:183px;
background-image:url(https://lorempixel.com/700/333/);
background-size:cover;
}
<div></div>
Post a Comment for "How To Crop/resize An Image To Change The Aspect Ratio Using Css"