resize image conserving aspect ratio css code example
Example: preserve aspect ratio image css
/* Simply add width without height,
aspect ratio will be maintained
and height will be calculated accordingly*/
img {
width: 100px;
}
/* Simply add width without height,
aspect ratio will be maintained
and height will be calculated accordingly*/
img {
width: 100px;
}