Answers for "height auto width 100% will ignore width and height"

0

height auto width 100% will ignore width and height

<style>
  img {
    width: 100%;
    height: auto;
    aspect-ratio: attr(width) / attr(height);
  } 
</style>
<img src="hero_image.jpg" alt="" width="500" height="500">
Posted by: Guest on July-01-2020

Code answers related to "height auto width 100% will ignore width and height"

Browse Popular Code Answers by Language