Answers for "scale image keep aspect ratio css"

CSS
3

css keep image ratio

img {
  object-fit: cover;
  width: 100px;
  height:100px;
}
Posted by: Guest on November-03-2020
0

how to set image size without changing aspect ratio in css

img {
  display: block;
  max-width:230px;
  max-height:95px;
  width: auto;
  height: auto;
}
Posted by: Guest on September-24-2021

Code answers related to "scale image keep aspect ratio css"

Browse Popular Code Answers by Language