preserve aspect ratio img 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;
}