Web features explorer

aspect-ratio

Widely available
Tags: css html Groups: CSS

The aspect-ratio CSS property controls the width-to-height ratio of elements. For <img> and <video> elements, the width and height attributes used together with height: auto control the aspect ratio while the image/video is loading. To learn more, see aspect-ratio at MDN.

Compatibility