The aspect-ratio CSS property is essential for maintaining a consistent width-to-height ratio of an element's box, regardless of changes in the viewport or parent container.
For the aspect-ratio property to function, at least one dimension of the element must be set to automatic size. Without this, the aspect ratio will not influence the box's preferred sizes.
Collection
[
|
...
]