The aspect-ratio CSS property allows you to define a preferred aspect ratio for an element. This helps maintain consistent sizing of elements, especially when their dimensions are determined by content or responsive layouts. It enables layouts that adapt naturally without additional hacks or JavaScript.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/aspect-ratio
The
aspect-ratioCSS property allows you to define a preferred aspect ratio for an element. This helps maintain consistent sizing of elements, especially when their dimensions are determined by content or responsive layouts. It enables layouts that adapt naturally without additional hacks or JavaScript.https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/aspect-ratio